/* ==========================================================================
   Greenarys Impact Certificate promotion (Phase 15, inc/impact-promo.php)
   1. The SAMPLE certificate mockup (homepage, Our Impact).
   2. "This order adds to your Impact Certificate" notes (product, cart,
      checkout, cart drawer).
   Certificate colours follow the Impact Engine brand colours:
   #43631D, #8CC63F, #F3F8EA, #1D2A1F.
   ========================================================================== */

/* ---------- 1. Certificate mockup ----------
   The figure is a size container: everything on the paper is sized in cqi
   (1% of the figure's width), so it scales like a real A4 landscape page. */
.gr-cert { --tilt: -2.5deg; --p: 1; margin: 0; container-type: inline-size; position: relative; }
.gr-cert__stage { position: relative; perspective: 1600px; perspective-origin: 50% 120%; }
.gr-cert__paper {
	position: relative; aspect-ratio: 297 / 210; overflow: hidden; border-radius: 0.8cqi;
	background:
		radial-gradient(120% 90% at 50% 0%, rgba(140, 198, 63, 0.10), transparent 60%),
		radial-gradient(80% 70% at 100% 100%, rgba(67, 99, 29, 0.07), transparent 60%),
		repeating-radial-gradient(circle at 50% 120%, transparent 0 1.1cqi, rgba(67, 99, 29, 0.035) 1.1cqi 1.25cqi),
		#fffdf6;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.8) inset,
		0 2px 4px rgba(29, 42, 31, 0.08),
		0 18px 40px -12px rgba(29, 42, 31, 0.28),
		0 40px 80px -30px rgba(67, 99, 29, 0.35);
	color: #1d2a1f; font-family: var(--gr-font-body); line-height: 1.2; text-align: center;
	transform-origin: 50% 100%;
	transform:
		translateY(calc((1 - var(--p)) * 56px))
		rotateX(calc((1 - var(--p)) * 24deg))
		rotate(calc(var(--p) * var(--tilt)));
	will-change: transform;
}
.gr-cert__frame {
	position: absolute; inset: 2.6cqi; display: flex; flex-direction: column; align-items: center;
	padding: 2.4cqi 4cqi 2.2cqi; box-sizing: border-box;
	border: 0.32cqi solid #43631d; border-radius: 0.4cqi;
	box-shadow: inset 0 0 0 0.7cqi #fffdf6, inset 0 0 0 0.85cqi #8cc63f;
}
.gr-cert__sprig { position: absolute; width: 9cqi; height: 9cqi; opacity: 0.9; }
.gr-cert__sprig--tl { left: 1.4cqi; bottom: 1.4cqi; }
.gr-cert__sprig--br { right: 1.4cqi; bottom: 1.4cqi; transform: scaleX(-1); }

.gr-cert__top { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; }
.gr-cert__logo { grid-column: 2; display: block; width: 20cqi; }
.gr-cert__logo img { display: block; width: 100%; height: auto; }
.gr-cert__id { grid-column: 3; justify-self: end; display: grid; justify-items: end; gap: 0.2cqi; position: relative; text-align: right; }
.gr-cert__id span { font-size: 1.15cqi; letter-spacing: 0.14em; text-transform: uppercase; color: #55614f; font-weight: 700; }
.gr-cert__id b { font: 700 1.75cqi/1 var(--gr-font-head); letter-spacing: 0.08em; color: #43631d; font-variant-numeric: tabular-nums; }

.gr-cert__kicker {
	margin: 2.6cqi 0 0; font: 700 1.7cqi/1 var(--gr-font-head); letter-spacing: 0.5em; text-transform: uppercase; color: #43631d;
	display: flex; align-items: center; gap: 1.6cqi; padding-left: 0.5em;
}
.gr-cert__kicker::before, .gr-cert__kicker::after { content: ""; width: 7cqi; height: 0.2cqi; background: linear-gradient(90deg, transparent, #8cc63f); }
.gr-cert__kicker::after { transform: scaleX(-1); }
.gr-cert__title {
	margin: 0.8cqi 0 0; padding-bottom: 0.4cqi; font: 800 9cqi/0.95 var(--gr-font-head); letter-spacing: 0.02em; color: #1d2a1f;
	background: linear-gradient(180deg, #2c4313 0%, #43631d 55%, #5d8a27 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.gr-cert__pre { margin: 1.8cqi 0 0; font-size: 1.8cqi; font-style: italic; color: #55614f; }
.gr-cert__name { margin: 0.4cqi 0 0; position: relative; }
.gr-cert__name > span {
	position: relative; display: inline-block; padding: 0 3cqi 0.7cqi; font: 600 4.9cqi/1.1 var(--gr-font-head); color: #43631d;
	border-bottom: 0.22cqi solid #8cc63f; min-width: 38cqi;
}
.gr-cert__text { margin: 1.4cqi 0 0; max-width: 60cqi; font-size: 1.75cqi; line-height: 1.4; color: #3a4a3c; }

.gr-cert__stats { list-style: none; margin: 2.4cqi 0 0; padding: 0; display: flex; gap: 1.6cqi; }
.gr-cert__stats li {
	position: relative; width: 16.5cqi; padding: 1.3cqi 0.8cqi 1.2cqi; box-sizing: border-box; display: grid; justify-items: center; gap: 0.5cqi;
	background: #f3f8ea; border: 0.14cqi solid #e4f0d2; border-radius: 1cqi;
}
.gr-cert__stats b { font: 800 3.9cqi/1 var(--gr-font-head); color: #1d2a1f; }
.gr-cert__stats span { font-size: 1.4cqi; color: #55614f; line-height: 1.15; }
.gr-cert__stat-impact i { display: flex; align-items: flex-end; gap: 0.5cqi; height: 3.9cqi; }
.gr-cert__stat-impact em { display: block; width: 1.2cqi; height: calc(var(--h) * 100%); border-radius: 0.3cqi 0.3cqi 0 0; background: linear-gradient(#8cc63f, #43631d); }

.gr-cert__foot { margin-top: auto; width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; }
.gr-cert__seal { width: 10.5cqi; height: 10.5cqi; justify-self: start; margin-left: 5cqi; filter: drop-shadow(0 0.4cqi 0.6cqi rgba(29, 42, 31, 0.25)); }
.gr-cert__sign { display: grid; justify-items: center; gap: 0.5cqi; padding-bottom: 0.4cqi; }
.gr-cert__sign-name {
	font: italic 600 2.6cqi/1 var(--gr-font-head); color: #43631d; letter-spacing: -0.01em;
	padding: 0 4cqi 0.6cqi; border-bottom: 0.15cqi solid #1d2a1f;
}
.gr-cert__sign-line { font-size: 1.15cqi; letter-spacing: 0.12em; text-transform: uppercase; color: #55614f; font-weight: 700; }
.gr-cert__qr { position: relative; justify-self: end; margin-right: 5cqi; display: grid; justify-items: center; gap: 0.4cqi; }
.gr-cert__qr-code { width: 8.6cqi; height: 8.6cqi; padding: 0.4cqi; background: #fff; border: 0.14cqi solid #e4f0d2; border-radius: 0.5cqi; display: block; }
.gr-cert__qr span { font-size: 1.1cqi; letter-spacing: 0.1em; text-transform: uppercase; color: #55614f; font-weight: 700; }

/* SAMPLE ribbon across the top-left corner, and a light that sweeps across once. */
.gr-cert__ribbon {
	position: absolute; z-index: 2; top: 0; left: 0; width: 26cqi; height: 26cqi; overflow: hidden; pointer-events: none;
}
.gr-cert__ribbon span {
	position: absolute; top: 5.4cqi; left: -7.4cqi; width: 30cqi; transform: rotate(-45deg); padding: 0.9cqi 0;
	background: #1d2a1f; color: #8cc63f; font: 800 1.7cqi/1 var(--gr-font-head); letter-spacing: 0.42em; text-indent: 0.42em; text-transform: uppercase;
	box-shadow: 0 0.4cqi 1cqi rgba(29, 42, 31, 0.3); border-block: 0.18cqi dashed rgba(140, 198, 63, 0.55);
}
.gr-cert__shine {
	position: absolute; inset: -20% auto -20% -60%; width: 40%; z-index: 1; pointer-events: none;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
	transform: skewX(-18deg) translateX(0); opacity: 0;
}
.gr-cert.is-shine .gr-cert__shine { animation: gr-cert-shine 1.6s var(--gr-ease) 0.35s 1 both; }
@keyframes gr-cert-shine { 0% { opacity: 0; transform: skewX(-18deg) translateX(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: skewX(-18deg) translateX(420%); } }

.gr-cert__caption { margin-top: var(--gr-s4); font-size: var(--gr-fs-xs); color: var(--gr-ink-soft); text-align: center; }

/* Badges laid over the certificate (homepage, Our Impact hero). */
.gr-cert-chip {
	position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 12px 7px 8px; border-radius: var(--gr-r-pill); background: #fff; color: var(--gr-ink);
	font: 700 12px/1.1 var(--gr-font-head); white-space: nowrap;
	box-shadow: 0 0 0 1px var(--gr-green-100), 0 8px 22px -8px rgba(29, 42, 31, 0.35);
}
.gr-cert-chip svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--gr-green-50); color: var(--gr-green); box-sizing: border-box; }
.gr-cert-chip--a { top: -46px; right: 2%; }
.gr-cert-chip--b { bottom: -16px; left: -4px; }
@media (min-width: 640px) {
	.gr-cert-chip { font-size: 13px; padding: 9px 14px 9px 9px; }
	.gr-cert-chip svg { width: 24px; height: 24px; padding: 4px; }
}
@media (min-width: 1024px) {
	.gr-cert-chip--a { top: -22px; right: auto; left: 20%; }
	.gr-cert-chip--b { bottom: -18px; left: -22px; }
}

/* Numbered markers (Our Impact "What's on your certificate"). */
.gr-cert span.gr-cert__pin {
	position: absolute; z-index: 3; top: -1.2cqi; right: -2.4cqi;
	width: max(22px, 3.2cqi); height: max(22px, 3.2cqi); border-radius: 50%; display: grid; place-items: center;
	background: #8cc63f; color: #1d2a1f; font: 800 max(11px, 1.6cqi)/1 var(--gr-font-head);
	box-shadow: 0 0 0 max(3px, 0.5cqi) rgba(140, 198, 63, 0.3), 0 2px 6px rgba(29, 42, 31, 0.25);
	text-align: center; letter-spacing: 0; text-transform: none;
}
.gr-cert .gr-cert__id span.gr-cert__pin { top: 50%; right: calc(100% + 1cqi); transform: translateY(-50%); }
.gr-cert .gr-cert__name span.gr-cert__pin { top: 50%; right: auto; left: calc(100% - 1.6cqi); transform: translateY(-60%); }
.gr-cert .gr-cert__qr span.gr-cert__pin { top: -1.6cqi; right: -2.6cqi; }

@media (prefers-reduced-motion: reduce) {
	.gr-cert { --p: 1 !important; }
	.gr-cert__paper { transform: rotate(var(--tilt)); will-change: auto; }
	.gr-cert.is-shine .gr-cert__shine { animation: none; }
}

/* ---------- 2. Shop notes ---------- */
.gr-ipromo {
	display: grid; grid-template-columns: 40px 1fr; gap: var(--gr-s3); align-items: start;
	margin: var(--gr-s4) 0; padding: var(--gr-s3) var(--gr-s4);
	background: linear-gradient(135deg, #f3f8ea 0%, #fbfdf6 100%); border: 1px solid var(--gr-green-100); border-radius: var(--gr-r);
	position: relative; overflow: hidden; text-align: left;
	border-left: 3px solid var(--gr-lime);
}
.gr-ipromo__icon {
	width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
	background: #fff; color: var(--gr-green); box-shadow: 0 0 0 1px var(--gr-green-100), 0 2px 6px rgba(67, 99, 29, 0.12);
}
.gr-ipromo__icon svg { width: 22px; height: 22px; }
.gr-ipromo__body { margin: 0; font-size: var(--gr-fs-sm); line-height: 1.45; color: var(--gr-ink-soft); }
.gr-ipromo__body strong { display: block; margin-bottom: 2px; font-family: var(--gr-font-head); font-weight: 700; font-size: var(--gr-fs-sm); color: var(--gr-ink); }
.gr-ipromo__link { color: var(--gr-green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.gr-ipromo__link:hover { color: var(--gr-green-dark); }

.gr-ipromo--product { margin: var(--gr-s5) 0 var(--gr-s3); }
.gr-ipromo--cart { margin: var(--gr-s4) 0 0; }
.gr-ipromo--checkout { margin: var(--gr-s4) 0 0; }
.gr-ipromo--drawer { grid-template-columns: 32px 1fr; gap: var(--gr-s2) var(--gr-s3); margin: 0 0 var(--gr-s3); padding: var(--gr-s2) var(--gr-s3); }
.gr-ipromo--drawer .gr-ipromo__icon { width: 32px; height: 32px; }
.gr-ipromo--drawer .gr-ipromo__icon svg { width: 18px; height: 18px; }
.gr-ipromo--drawer .gr-ipromo__body { font-size: var(--gr-fs-xs); }
.gr-ipromo--drawer { align-items: center; }
.gr-ipromo--drawer .gr-ipromo__body strong { display: inline; font-size: var(--gr-fs-xs); margin: 0; }
.gr-ipromo-block { max-width: var(--gr-max); margin: var(--gr-s5) auto; padding-inline: var(--gr-gutter); box-sizing: border-box; }
