/* SN Hero: full-screen photograph, logo and one line bottom-left on the page gutter. */

.sn-hero {
	position: relative;
	isolation: isolate;
	display: grid;
	align-items: end;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	background: var(--sn-walnut);
}

.sn-hero--tall {
	min-height: 78vh;
	min-height: 78svh;
}

.sn-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

/* Slides stack in one place; the active one sits on top and fades in over the last. */
.sn-hero__slide {
	position: absolute;
	inset: 0;
	overflow: hidden;
	opacity: 0;
}

.sn-hero__slide.is-active {
	opacity: 1;
}

/* Scoped under .sn-hero to outrank Elementor's `.elementor img { height: auto }`. */
.sn-hero .sn-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
	transform-origin: 50% 60%;
}

/* Scrim: a light effect, not decoration. Bottom for the logo, a little at the top for the nav. */
.sn-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		linear-gradient(to top, color-mix(in oklch, var(--sn-walnut) calc(var(--sn-hero-scrim, 0.85) * 100%), transparent) 0%, transparent 58%),
		linear-gradient(to bottom, color-mix(in oklch, var(--sn-walnut) 50%, transparent) 0%, transparent 24%);
}

.sn-hero__content {
	padding: 0 var(--sn-gutter) clamp(40px, 8vh, 96px);
}

.sn-hero__title {
	margin: 0;
	line-height: 0;
	color: var(--sn-plaster);
}

.sn-hero__title .sn-logo {
	width: auto;
	height: clamp(128px, 14vw, 216px);
}

.sn-hero__title + .sn-hero__heading {
	margin-top: clamp(24px, 3vw, 40px);
}

.sn-hero__heading {
	max-width: 14ch;
	margin: 0;
	color: var(--sn-plaster);
	font-family: var(--e-global-typography-displayxl-font-family, "Libre Caslon Display"), Georgia, serif;
	font-size: clamp(64px, 9vw, 140px);
	font-weight: 400;
	line-height: 0.92;
	letter-spacing: -0.02em;
}

/* Scroll hint, bottom-right: a hairline that keeps dropping. */
.sn-hero__cue {
	position: absolute;
	right: var(--sn-gutter);
	bottom: clamp(40px, 8vh, 96px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	color: var(--sn-plaster);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.sn-hero__cue i {
	position: relative;
	width: 1px;
	height: 56px;
	overflow: hidden;
	background: var(--sn-hairline);
}

.sn-hero__cue i::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--sn-plaster);
	animation: sn-cue 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes sn-cue {
	0% { transform: translateY(-100%); }
	55% { transform: translateY(0); }
	100% { transform: translateY(100%); }
}

@media (max-width: 767px) {
	.sn-hero__cue { display: none; }
}

/* Slideshow controls, bottom-right: title, counter, a brass line that fills per photograph, pause. */
.sn-hero__slides-ui {
	position: absolute;
	right: var(--sn-gutter);
	bottom: clamp(40px, 8vh, 96px);
	display: flex;
	align-items: center;
	gap: 20px;
	color: var(--sn-plaster);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
}

.sn-hero__slide-title {
	max-width: 22ch;
	overflow: hidden;
	color: var(--sn-plaster);
	text-align: right;
	text-overflow: ellipsis;
	white-space: nowrap;
	letter-spacing: 0.08em;
	text-transform: none;
	font-size: 13px;
	font-weight: 400;
}

.sn-hero__bar {
	position: relative;
	width: 88px;
	height: 1px;
	background: color-mix(in oklch, var(--sn-plaster) 28%, transparent);
}

.sn-hero__bar i {
	position: absolute;
	inset: 0;
	background: var(--sn-brass);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

.sn-hero__pause {
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--sn-plaster);
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
}

.sn-hero__pause:hover,
.sn-hero__pause:focus-visible {
	background: none;
	color: var(--sn-brass);
}

@media (max-width: 767px) {
	.sn-hero__slides-ui {
		left: var(--sn-gutter);
		bottom: 20px;
		gap: 14px;
	}

	.sn-hero__slide-title { display: none; }
	.sn-hero__bar { flex: 1; }

	/* Leave room for the controls under the heading. */
	.sn-hero--indicators .sn-hero__content { padding-bottom: 88px; }
}

/* Brighter interiors share the slideshow, so the shade reaches further up behind the heading. */
.sn-hero--slideshow::after {
	background:
		linear-gradient(to top, color-mix(in oklch, var(--sn-walnut) calc(var(--sn-hero-scrim, 0.85) * 100%), transparent) 0%, color-mix(in oklch, var(--sn-walnut) 45%, transparent) 45%, transparent 75%),
		linear-gradient(to bottom, color-mix(in oklch, var(--sn-walnut) 72%, transparent) 0%, transparent 28%);
}

.sn-hero__statement {
	max-width: 46ch;
	margin: clamp(20px, 2.4vw, 32px) 0 0;
	color: var(--sn-plaster);
	text-wrap: balance;
}

/* Hidden until widget.js plays the entrance; the fallback shows them if it never runs. */
.sn-motion .sn-hero [data-hero-item],
.sn-motion .sn-hero [data-hero-heading] {
	opacity: 0;
	animation: sn-hero-fallback 0s 2.5s forwards;
}

.sn-motion .sn-hero.is-playing [data-hero-item],
.sn-motion .sn-hero.is-playing [data-hero-heading] {
	animation: none;
}

@keyframes sn-hero-fallback {
	to { opacity: 1; }
}

/* Pause with no visible controls: off screen until reached by keyboard, then bottom-right. */
.sn-hero__pause--quiet {
	position: absolute;
	right: var(--sn-gutter);
	bottom: clamp(40px, 8vh, 96px);
	padding: 0 4px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.sn-hero__pause--quiet:not(:focus-visible) {
	clip-path: inset(50%);
	overflow: hidden;
	width: 1px;
	min-width: 0;
	height: 1px;
	min-height: 0;
	white-space: nowrap;
}

/* Desktop-only slideshow and logo: smaller screens keep just the first photograph (the others
   are display:none, so phones never download them) and show the logo above the heading. */
@media (max-width: 1024px) {
	.sn-hero--desktop-slides .sn-hero__slide:not(:first-child),
	.sn-hero--desktop-slides .sn-hero__pause--quiet {
		display: none;
	}
}

@media (min-width: 1025px) {
	.sn-hero--logo-mobile .sn-hero__title {
		display: none;
	}
}
