/* shamagnus: main-site home page only (body.sh-home). Colour bands, overlapping hero, rise-on-scroll. Loaded from functions.php on the main front page only. */

.sh-home {
	--sh-cream: #f2ede6;
	--sh-ink: #1a1410;
	--sh-flame: #D9482B;
	--sh-flame-text: #B8361B;
	--sh-flame-on-dark: #F4896A;
	--sh-ember: #5a1b10;
	--sh-sand: #e6ddd0;
	--sh-pad-x: max(16px, var(--wp--style--root--padding-left, 16px));
	overflow-x: clip;
}

/* The 100vw bands can be a few pixels wider than the page when a scrollbar shows: hide that sideways scroll. */
html:has(body.sh-home) { overflow-x: hidden; }

/* Full-width bands, centred content. */
.sh-home .sh-band {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw) !important;
	margin-block: 0 !important;
	padding-block: clamp(56px, 8vw, 104px);
	background: var(--sh-cream);
	color: var(--sh-ink);
	font-size: clamp(1.05rem, .55vw + .95rem, 1.25rem);
	line-height: 1.6;
	--sh-mu: #6b5f50;
	--sh-ac: var(--sh-flame-text);
}
.sh-home .sh-band > * { margin: 0 !important; }
.sh-home .sh-band-in {
	max-width: 1120px;
	margin-inline: auto !important;
	padding-inline: var(--sh-pad-x);
}
.sh-home .sh-band p { margin: 0; }
.sh-home .sh-band a { color: var(--sh-ac); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
.sh-home .sh-band a:hover { opacity: .8; }
.sh-home .sh-band a:focus-visible { outline: 2px solid var(--sh-flame); outline-offset: 3px; }

.sh-home .sh-ember { background: var(--sh-ember); color: #f6ece4; --sh-mu: #d9bfb2; --sh-ac: var(--sh-flame-on-dark); }
.sh-home .sh-sand { background: var(--sh-sand); --sh-mu: #5f5445; }

/* Section edges: straight, with a soft shadow cast upward onto the band above (each band sits over the one before it). */
.sh-home .sh-ember,
.sh-home .sh-sand,
.sh-home .sh-substackband {
	position: relative;
	box-shadow: 0 -14px 26px -8px rgba(26, 20, 16, .42);
}

/* Section heading: Gloock, with the small flame above it. */
.sh-home .sh-band-title {
	margin: 0 0 .4em !important;
	font-size: clamp(2.2rem, 4.6vw, 3.5rem);
	line-height: 1.08;
	text-wrap: balance;
}
.sh-home .sh-band-title::before {
	content: "";
	display: inline-block;
	width: .74em;
	height: .94em;
	margin-right: .26em;
	vertical-align: -.06em;
	background: url("shamagnus-flame.svg") center / contain no-repeat;
}
.sh-home .sh-band-head p { color: var(--sh-mu); max-width: 40rem; }

/* Hero: bigger photo, quote card overlapping its edge. */
.sh-home .sh-hero2 { padding-block: clamp(32px, 5vw, 72px) clamp(56px, 8vw, 104px); }
.sh-home .sh-hero2-in {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	align-items: center;
}
.sh-home .sh-hero2-in { container-type: inline-size; }
.sh-home .sh-hero2-in .sh-eyebrow {
	grid-column: 1 / -1;
	grid-row: 1;
	margin: 0 0 clamp(20px, 3vw, 36px) !important;
	text-align: center;
	white-space: nowrap;
	font-size: min(2rem, 4.2cqi);
	line-height: 1.2;
}
.sh-home .sh-hero2-photo { grid-column: 5 / 13; grid-row: 2; margin: 0 !important; }
.sh-home .sh-hero2-photo img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 52% 40%; border-radius: 14px; }
.sh-home .sh-hero2-card {
	grid-column: 1 / 7;
	grid-row: 2;
	z-index: 2;
	background: var(--sh-ember);
	color: #f6ece4;
	border-radius: 14px;
	padding: clamp(24px, 3vw, 44px);
	box-shadow: 0 22px 50px rgba(26, 20, 16, .28);
	font-size: clamp(1rem, .4vw + .92rem, 1.15rem);
}
.sh-home .sh-hero2-title {
	margin: 0 0 .6em !important;
	font-size: clamp(1.8rem, 3.2vw, 2.7rem);
	line-height: 1.12;
	text-wrap: balance;
	color: inherit;
}
.sh-home .sh-hero2-card p { color: #f1e1d6; }
.sh-home .sh-hero2-card .sh-sign { color: var(--sh-flame-on-dark); }

/* Video: heading and intro side by side on top, showreel full width under. */
.sh-home .sh-videoband .sh-band-in { display: grid; gap: clamp(28px, 4vw, 48px); }
@media (min-width: 861px) {
	.sh-home .sh-videoband .sh-band-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(32px, 5vw, 72px); align-items: end; }
	.sh-home .sh-videoband .sh-band-head > * { margin: 0 !important; }
	.sh-home .sh-videoband .sh-band-title { margin: 0 !important; }
}
.sh-home .sh-videoband .sh-reel-embed { max-width: 100%; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }

/* Poetry: text beside the Oracle card. */
.sh-home .sh-poetry2 { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 861px) { .sh-home .sh-poetry2 { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.sh-home .sh-poetry2 .sh-oracle a { box-shadow: 0 14px 40px rgba(26, 20, 16, .22); }
.sh-home .sh-poetry2 .sh-oracle a:hover { box-shadow: 0 20px 48px rgba(26, 20, 16, .28); }

/* Substack: posts as cards (same card look as other areas will use). */
.sh-home .sh-substackband .sh-substack { margin-top: clamp(24px, 3vw, 36px); }
.sh-home .sh-substack-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.sh-home .sh-substack-list a {
	box-sizing: border-box;
	height: 100%;
	align-content: start;
	gap: 8px;
	padding: 22px 22px 24px !important;
	background: #fbf8f3;
	border: 1px solid rgba(26, 20, 16, .12) !important;
	border-radius: 12px;
	color: var(--sh-ink);
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease;
}
.sh-home .sh-substack-list a:hover { opacity: 1; transform: translateY(-4px); box-shadow: 0 16px 34px rgba(26, 20, 16, .14); }
.sh-home .sh-substack-title { font-size: 1.4rem; }
.sh-home .sh-substack-desc { color: var(--sh-mu); font-size: .92em; }
.sh-home .sh-substack-sub { margin: 24px 0 0 !important; }
.sh-home .sh-substack-sub a { font-weight: 600; }

/* Footer: Ink. */
.sh-home footer.wp-block-template-part {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw) !important;
	margin-block-start: 0 !important;
	background: var(--sh-ink);
	color: var(--sh-cream);
	box-sizing: border-box;
	padding-inline: max(var(--sh-pad-x), calc((100vw - 1120px) / 2));
}
.sh-home footer.wp-block-template-part > * { padding-inline: 0 !important; max-width: none !important; }
.sh-home footer.wp-block-template-part a,
.sh-home footer.wp-block-template-part .wp-block-navigation-item__content { color: var(--sh-cream); }
.sh-home footer.wp-block-template-part a:hover { color: var(--sh-flame-on-dark); }
.sh-home footer.wp-block-template-part .has-accent-4-color { color: #b5a998 !important; }
.sh-home footer.wp-block-template-part .wp-block-social-links .wp-social-link { color: var(--sh-cream) !important; }
.sh-home footer.wp-block-template-part .wp-block-social-links .wp-social-link a { color: var(--sh-cream); }
.sh-home footer.wp-block-template-part .wp-block-social-links .wp-social-link svg { fill: currentColor; }

/* Rise on scroll: small lift; text stays readable at rest. Off for reduced motion. */
.sh-home .sh-rise { transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s ease; }
.sh-anim .sh-rise:not(.sh-in-view) { transform: translateY(26px); opacity: .35; }
@media (prefers-reduced-motion: reduce) {
	.sh-home .sh-rise, .sh-home .sh-substack-list a { transition: none; }
	.sh-anim .sh-rise:not(.sh-in-view) { transform: none; opacity: 1; }
}

/* Phone */
@media (max-width: 860px) {
	.sh-home .sh-hero2-in { display: block; }
	.sh-home .sh-hero2-photo img { aspect-ratio: 4 / 3.4; }
	.sh-home .sh-hero2-card { margin: -80px 14px 0 !important; position: relative; }
}

/* Poetry: poem block (video with intro text) under the Poetry intro and Oracle. */
.sh-home .sh-poemblock {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(24px, 3vw, 40px);
	align-items: center;
	padding-top: clamp(40px, 5vw, 72px);
}
@media (min-width: 861px) { .sh-home .sh-poemblock { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.sh-home .sh-poem-video {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 18px 44px rgba(26, 20, 16, .28);
}
.sh-home .sh-poem-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sh-home .sh-poemblock .sh-poem-text { margin: 0; max-width: 34rem; }

/* Second poem entry: cover picture on the right on wide screens, picture first on phones. */
.sh-home .sh-poem-title {
	margin: 0 0 .5em;
	font-family: var(--wp--preset--font-family--gloock);
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	line-height: 1.15;
}
.sh-home .sh-poem-text > * { margin: 0; }
.sh-home .sh-poem-text > p + p { margin-top: 0; }
.sh-home .sh-poem-cover {
	display: block;
	max-width: 440px;
	width: 100%;
	justify-self: center;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 18px 44px rgba(26, 20, 16, .28);
	transition: transform .25s ease, box-shadow .25s ease;
}
.sh-home .sh-poem-cover:hover { transform: translateY(-4px); box-shadow: 0 24px 54px rgba(26, 20, 16, .34); }
.sh-home .sh-poem-cover img { display: block; width: 100%; height: auto; border-radius: 0; }
@media (min-width: 861px) {
	.sh-home .sh-poemblock-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.sh-home .sh-poemblock-flip .sh-poem-text { order: -1; justify-self: end; }
	.sh-home .sh-poemblock-flip .sh-poem-cover { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .sh-home .sh-poem-cover { transition: none; } }

/* Event pages (template "Event"): hero with title, facts and photo, then description and details bands. */
.sh-event .sh-event-hero { padding-block: clamp(40px, 6vw, 88px) clamp(56px, 8vw, 104px); }
.sh-event .sh-event-hero-in { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 861px) { .sh-event .sh-event-hero-in { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.sh-event .sh-event-intro > * { margin: 0; }
.sh-event .sh-event-intro > * + * { margin-top: 1rem; }
.sh-event .sh-event-title { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1.03; text-wrap: balance; }
.sh-event .sh-event-tagline { font-size: 1.15em; color: var(--sh-mu); max-width: 34rem; }
.sh-event .sh-event-facts { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .5rem; font-weight: 600; }
.sh-event .sh-event-facts li { padding-left: 1.1em; position: relative; }
.sh-event .sh-event-facts li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5em; height: .5em; border-radius: 50%; background: var(--sh-flame); }
.sh-event .sh-event-cta { margin: 1.6rem 0 0 !important; }
.sh-event .sh-btn {
	display: inline-block;
	padding: .8em 1.7em;
	border-radius: 999px;
	background: var(--sh-ember);
	color: #f6ece4 !important;
	font-weight: 600;
	text-decoration: none !important;
	transition: transform .2s ease, box-shadow .2s ease;
}
.sh-event .sh-btn:hover { opacity: 1 !important; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(90, 27, 16, .35); }
.sh-event .sh-event-photo {
	aspect-ratio: 4 / 3.4;
	border-radius: 14px;
	display: flex;
	align-items: flex-end;
	padding: 18px;
	color: rgba(255, 246, 239, .8);
	font-size: .9rem;
	background:
		radial-gradient(circle at 70% 30%, #f6d9a8 0, transparent 38%),
		linear-gradient(140deg, #b9694a, #5a1b10 60%, #2b1b2e);
	box-shadow: 0 22px 50px rgba(26, 20, 16, .28);
}
.sh-event .sh-event-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.sh-event .sh-event-about .sh-band-head > * + * { margin-top: 1rem; }
.sh-event .sh-event-about .sh-band-head p { max-width: 44rem; }
.sh-event .sh-event-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px; margin-top: clamp(24px, 3vw, 40px); }
.sh-event .sh-event-cards > * { margin: 0 !important; }
.sh-event .sh-event-card { background: #f2ede6; border: 1px solid rgba(26, 20, 16, .12); border-radius: 12px; padding: 22px 22px 24px; }
.sh-event .sh-event-card > * { margin: 0; }
.sh-event .sh-event-card h3 { font-size: 1.35rem; line-height: 1.2; margin-bottom: .4rem; }
.sh-event .sh-event-card p { color: var(--sh-mu); font-size: .95em; }
.sh-event .sh-event-details .sh-event-cta { margin-top: clamp(28px, 3vw, 44px) !important; }
@media (prefers-reduced-motion: reduce) { .sh-event .sh-btn { transition: none; } }

/* Event "let me know" email form. */
.sh-event .sh-notify { margin-top: 1.6rem; max-width: 36rem; }
.sh-event .sh-notify-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sh-event .sh-notify input[type="email"] {
	flex: 1 1 14rem;
	min-width: 0;
	padding: .8em 1.2em;
	border: 1.5px solid rgba(26, 20, 16, .35);
	border-radius: 999px;
	background: #fffdf9;
	color: var(--sh-ink);
	font: inherit;
}
.sh-event .sh-notify input[type="email"]:focus-visible { outline: 2px solid var(--sh-flame); outline-offset: 2px; }
.sh-event .sh-notify .sh-btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; flex: 0 1 auto; }
.sh-event .sh-notify .sh-btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.sh-event .sh-notify-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.sh-event .sh-notify-note { margin: .8rem 0 0 !important; font-size: .85em; color: var(--sh-mu); }
.sh-event .sh-notify-thanks { margin: 0 !important; font-family: var(--wp--preset--font-family--gloock); font-size: 1.5rem; color: var(--sh-flame-text); }
.sh-event .sh-notify-thanks:focus { outline: none; }
.sh-event .sh-notify-error { margin: .8rem 0 0 !important; color: #8e2f12; }
.sh-event .sh-event-cta { margin: 0 !important; }

/* Event title as a picture (lettering exported from Adobe Fonts); the real title text is the picture's alt text. */
.sh-event .sh-event-title img { display: block; width: min(100%, 720px); height: auto; }

/* Buttons on the dark red bands: cream button with red text. */
.sh-event .sh-ember .sh-btn { background: #f2ede6; color: var(--sh-ember) !important; }
.sh-event .sh-ember .sh-btn:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.sh-event .sh-event-oracle .sh-event-cta { margin-top: 1.4rem !important; }

/* Event page: "presents" line, closing line, two-card row. */
.sh-event .sh-event-presents { font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--sh-mu); margin: 0 0 .6rem !important; }
.sh-event .sh-event-details .sh-band-head p { max-width: 40rem; }
.sh-event .sh-event-closing { font-family: var(--wp--preset--font-family--display, inherit); font-size: 1.4rem; margin-top: 1.4rem !important; }
.sh-event .sh-event-details .sh-band-title { max-width: 40rem; font-size: clamp(1.7rem, 3.4vw, 2.4rem); }

/* Event page v0.33.9: details on ember, Oracle on sand. */
.sh-event .sh-event-presents { text-transform: none; letter-spacing: .12em; }
.sh-event .sh-bt { font-family: var(--wp--preset--font-family--instrument-sans, 'Instrument Sans', sans-serif); font-style: italic; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; }
.sh-event .sh-event-card h3 .sh-bt { font-size: .85em; }
.sh-event .sh-event-card { color: #1a1410; --sh-mu: #5f5445; }
.sh-event .sh-event-card h3 { font-family: var(--wp--preset--font-family--gloock); font-weight: 400; }
.sh-event .sh-event-closing { font-family: var(--wp--preset--font-family--gloock); font-weight: 400; font-style: normal; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; margin-top: 1.6rem !important; }
.sh-event .sh-ember .sh-notify-thanks { color: #F4896A; }
.sh-event .sh-ember .sh-notify-error { color: #F4B09A; }
.sh-event .sh-sand .sh-btn { background: var(--sh-ember); color: #f6ece4 !important; }
.sh-event .sh-event-more .sh-event-cards { margin-top: 0; margin-bottom: clamp(24px,3vw,40px); }
.sh-event .sh-notify-thanks { font-size: 1.2rem; line-height: 1.35; }

/* Front page: Events band with the event card. */
.sh-home .sh-evcard { display: block; background: #f2ede6; color: #1a1410; text-decoration: none; border-radius: 12px; padding: 24px 26px 26px; max-width: 34rem; margin-top: clamp(20px, 3vw, 32px); box-shadow: 0 14px 34px rgba(0, 0, 0, .3); transition: transform .2s ease, box-shadow .2s ease; }
.sh-home .sh-evcard:hover { transform: translateY(-3px); box-shadow: 0 20px 42px rgba(0, 0, 0, .4); }
.sh-home .sh-evcard img { display: block; width: min(100%, 360px); height: auto; margin-bottom: .9rem; }
.sh-home .sh-evcard span { display: block; }
.sh-home .sh-evcard-tag { font-size: 1.05em; color: #5f5445; }
.sh-home .sh-evcard-facts { font-weight: 600; margin-top: .5rem; }
.sh-home .sh-evcard-more { margin-top: 1rem; font-weight: 600; color: #B8361B; }
.sh-home .sh-evcard .sh-evcard-facts { color: #1a1410; }

/* Event photo (v0.34.2): portrait photo of the hosts. */
.sh-event .sh-event-photo { aspect-ratio: 4 / 4.6; padding: 0; overflow: hidden; background: none; }
.sh-event .sh-event-photo img { object-position: 50% 22%; display: block; }

/* Very wide screens (v0.34.3): the page grows with the window and the hero text scales with the box,
   so the quote card keeps the same proportions to the photo as on a laptop. */
@media (min-width: 1400px) {
	.sh-home .sh-band-in { max-width: min(max(1120px, 78vw), 1680px); }
	.sh-home .sh-hero2-title { font-size: clamp(2.7rem, 4.1cqi, 3.9rem); }
	.sh-home .sh-hero2-card { font-size: clamp(1.15rem, 1.75cqi, 1.6rem); }
	.sh-home .sh-hero2-card { padding: clamp(44px, 4.2cqi, 64px); }
}

/* Events band in plum (v0.34.4). No edge shadow: dark on dark would look like a smudge. */
.sh-home .sh-plum { background: #3a2343; color: #f6ece4; --sh-mu: #dccbe2; --sh-ac: #F4896A; position: relative; }

/* v0.34.5: Poetry on plum, Events on sand. Plum gets the same upward edge shadow as the other bands. */
.sh-home .sh-plum { box-shadow: 0 -14px 26px -8px rgba(26, 20, 16, .42); }
.sh-home .sh-plum .sh-poem-title { color: inherit; }
.sh-home .sh-plum .sh-oracle a, .sh-home .sh-plum .sh-poem-cover { outline: 1px solid rgba(246, 236, 228, .18); outline-offset: 0; }
.sh-home .sh-eventband .sh-evcard { box-shadow: 0 14px 34px rgba(26, 20, 16, .22); }
.sh-home .sh-eventband .sh-evcard:hover { box-shadow: 0 20px 42px rgba(26, 20, 16, .3); }
.sh-home .sh-eventband .sh-evcard { background: #f2ede6; }

/* v0.34.6: "SPRINGTIME ODYSSEY" line above the title. */
.sh-event .sh-event-presents { font-size: 1.05rem; font-weight: 600; text-transform: uppercase; letter-spacing: .22em; }

/* v0.34.7: more breathing space above the email field. */
.sh-event .sh-notify { margin-top: 2.6rem; }
