/**
 * Snooze Glen — front-end styles.
 *
 * Everything is scoped under .sg-root and uses sg- prefixed classes, because
 * this has to survive dropping into somebody else's theme. Where a theme is
 * likely to fight (headings, blockquote, figure, button), the reset is explicit.
 *
 * One theme on purpose: the identity is a dark forest with a single warm light
 * in it, so there is no light mode to switch to.
 */

.sg-root {
	/* palette — mirrors style/palette.md */
	--sg-night: #0C1520;
	--sg-panel: #152435;
	--sg-panel-2: #1B2E42;
	--sg-edge: rgba( 244, 235, 210, 0.11 );
	--sg-ink: #F4EBD2;
	--sg-ink-dim: #C9CDBE;
	--sg-sage: #9AAA88;
	--sg-gold: #F6C85F;
	--sg-blossom: #D9A7A7;

	--sg-display: "Snooze Quicksand", ui-rounded, system-ui, sans-serif;
	--sg-body: "Snooze Literata", Georgia, serif;
	--sg-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

	--sg-step: clamp( 1rem, 0.94rem + 0.3vw, 1.12rem );
	--sg-pad: clamp( 20px, 5vw, 40px );

	/* Break out of whatever container the theme wrapped us in. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc( 50% - 50vw );
	margin-right: calc( 50% - 50vw );

	background: var( --sg-night );
	color: var( --sg-ink );
	font-family: var( --sg-body );
	font-size: var( --sg-step );
	line-height: 1.68;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

@font-face {
	font-family: "Snooze Quicksand";
	src: url( "../fonts/quicksand.woff2" ) format( "woff2" );
	font-weight: 300 700;
	font-display: swap;
}

@font-face {
	font-family: "Snooze Literata";
	src: url( "../fonts/literata.woff2" ) format( "woff2" );
	font-weight: 300 700;
	font-display: swap;
}

.sg-root *,
.sg-root *::before,
.sg-root *::after {
	box-sizing: border-box;
}

.sg-root img {
	max-width: 100%;
	height: auto;
	display: block;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* :not(.sg-cta) matters — .sg-root a is specificity (0,1,1) and would
   otherwise outrank .sg-cta (0,1,0), painting the button label gold on gold. */
.sg-root a:not( .sg-cta ) {
	color: var( --sg-gold );
}

.sg-root :focus-visible {
	outline: 2px solid var( --sg-gold );
	outline-offset: 3px;
	border-radius: 4px;
}

.sg-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
}

.sg-shell {
	max-width: 1080px;
	margin: 0 auto;
	padding-inline: var( --sg-pad );
}

.sg-shell--narrow {
	max-width: 680px;
	text-align: center;
}

/* ---------------------------------------------------------------- hero --- */

.sg-hero {
	position: relative;
	min-height: min( 88vh, 860px );
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	padding: 90px var( --sg-pad ) 0;
}

.sg-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.sg-hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sg-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient( 115% 85% at 50% 34%,
		rgba( 12, 21, 32, 0.30 ) 0%,
		rgba( 12, 21, 32, 0.80 ) 62%,
		var( --sg-night ) 100% );
}

.sg-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 26px;
}

.sg-hero__inner svg {
	width: clamp( 240px, 30vw, 360px );
	height: auto;
}

.sg-hero__line {
	margin: 0;
	max-width: 34ch;
	color: var( --sg-ink-dim );
	font-size: clamp( 1.05rem, 0.98rem + 0.5vw, 1.3rem );
}

.sg-root .sg-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var( --sg-display );
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	color: var( --sg-night );
	background: var( --sg-gold );
	padding: 13px 26px;
	border-radius: 999px;
	box-shadow: 0 0 0 0 rgba( 246, 200, 95, 0.45 );
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sg-root .sg-cta:hover,
.sg-root .sg-cta:focus {
	color: var( --sg-night );
	transform: translateY( -2px );
	box-shadow: 0 8px 34px -6px rgba( 246, 200, 95, 0.5 );
}

.sg-hero__cast {
	position: relative;
	z-index: 1;
	width: min( 1180px, 100% );
	margin-top: auto;
	padding-top: 54px;
}

.sg-hero__cast img {
	width: 100%;
}

/* ------------------------------------------------------------ sections --- */

.sg-section {
	padding-block: clamp( 64px, 9vw, 116px );
}

.sg-eyebrow {
	font-family: var( --sg-mono );
	font-size: 0.68rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var( --sg-gold );
	margin: 0 0 14px;
}

.sg-root .sg-h2 {
	font-family: var( --sg-display );
	font-weight: 700;
	color: var( --sg-ink );
	margin: 0 0 18px;
	padding: 0;
	font-size: clamp( 1.7rem, 1.3rem + 1.7vw, 2.5rem );
	line-height: 1.18;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.sg-lede {
	max-width: 62ch;
	margin: 0 0 18px;
	color: var( --sg-ink-dim );
}

.sg-lede:last-child {
	margin-bottom: 0;
}

.sg-lede--center {
	margin-inline: auto;
}

.sg-world {
	background: linear-gradient( 180deg, transparent, rgba( 21, 36, 53, 0.55 ) 30%, transparent );
}

.sg-world__grid {
	display: grid;
	gap: 34px;
	grid-template-columns: 1fr;
	align-items: start;
}

@media ( min-width: 860px ) {
	.sg-world__grid {
		grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1fr );
	}
}

/* ------------------------------------------------------------- friends --- */

.sg-friends {
	display: grid;
	gap: 22px;
	grid-template-columns: 1fr;
	margin-top: 44px;
}

@media ( min-width: 760px ) {
	.sg-friends {
		grid-template-columns: 1fr 1fr;
	}
}

.sg-friend {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	background: linear-gradient( 160deg, var( --sg-panel-2 ), var( --sg-panel ) );
	border: 1px solid var( --sg-edge );
	border-radius: 18px;
	padding: 22px;
	margin: 0;
}

.sg-friend__art {
	flex: 0 0 116px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	align-self: stretch;
}

.sg-friend__art img {
	width: 116px;
	filter: drop-shadow( 0 14px 20px rgba( 6, 11, 18, 0.55 ) );
}

.sg-friend__text {
	min-width: 0;
}

.sg-root .sg-friend__name {
	font-family: var( --sg-display );
	font-weight: 700;
	font-size: 1.32rem;
	color: var( --sg-ink );
	margin: 0 0 8px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	align-items: baseline;
	line-height: 1.25;
}

.sg-friend__name span {
	font-family: var( --sg-mono );
	font-size: 0.62rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var( --sg-sage );
	font-weight: 400;
}

.sg-root .sg-friend__quote {
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	background: none;
	font-style: italic;
	color: var( --sg-gold );
	font-size: 1.02rem;
	line-height: 1.5;
	quotes: none;
}

.sg-friend__body {
	margin: 0;
	font-size: 0.95rem;
	color: var( --sg-ink-dim );
	line-height: 1.62;
}

/* -------------------------------------------------------------- places --- */

.sg-places {
	display: grid;
	gap: 18px;
	grid-template-columns: 1fr;
	margin-top: 44px;
}

@media ( min-width: 640px ) {
	.sg-places {
		grid-template-columns: 1fr 1fr;
	}
}

@media ( min-width: 1000px ) {
	.sg-places {
		grid-template-columns: repeat( 3, 1fr );
	}
}

.sg-root .sg-place {
	margin: 0;
	padding: 0;
	border-radius: 16px;
	overflow: hidden;
	background: var( --sg-panel );
	border: 1px solid var( --sg-edge );
}

.sg-place img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.sg-place figcaption {
	padding: 18px 20px 22px;
}

.sg-root .sg-place__name {
	font-family: var( --sg-display );
	font-weight: 700;
	font-size: 1.08rem;
	color: var( --sg-ink );
	margin: 0 0 7px;
	padding: 0;
}

.sg-place__body {
	margin: 0;
	font-size: 0.9rem;
	color: var( --sg-ink-dim );
	line-height: 1.6;
}

/* --------------------------------------------------------------- rules --- */

.sg-why {
	background: linear-gradient( 180deg, transparent, rgba( 21, 36, 53, 0.5 ), transparent );
}

.sg-rules {
	display: grid;
	gap: 1px;
	margin-top: 44px;
	border: 1px solid var( --sg-edge );
	border-radius: 18px;
	overflow: hidden;
	background: var( --sg-edge );
}

@media ( min-width: 760px ) {
	.sg-rules {
		grid-template-columns: 1fr 1fr;
	}
}

.sg-rule {
	background: var( --sg-panel );
	padding: 26px 24px;
}

.sg-root .sg-rule__name {
	font-family: var( --sg-display );
	font-weight: 700;
	font-size: 1.06rem;
	margin: 0 0 8px;
	padding: 0;
	color: var( --sg-ink );
}

.sg-rule__body {
	margin: 0;
	font-size: 0.92rem;
	color: var( --sg-ink-dim );
	line-height: 1.62;
}

/* ---------------------------------------------------------------- list --- */

.sg-signup {
	display: flex;
	gap: 10px;
	margin: 26px auto 14px;
	max-width: 460px;
	flex-wrap: wrap;
}

.sg-root .sg-signup input[ type="email" ] {
	flex: 1 1 220px;
	min-width: 0;
	background: var( --sg-panel );
	border: 1px solid var( --sg-edge );
	border-radius: 999px;
	padding: 13px 20px;
	color: var( --sg-ink );
	font-family: var( --sg-body );
	font-size: 0.98rem;
	line-height: 1.4;
}

.sg-root .sg-signup input[ type="email" ]::placeholder {
	color: #7E8C96;
}

.sg-root .sg-signup button {
	font-family: var( --sg-display );
	font-weight: 700;
	font-size: 0.98rem;
	border: 0;
	border-radius: 999px;
	padding: 13px 26px;
	background: var( --sg-gold );
	color: var( --sg-night );
	cursor: pointer;
	line-height: 1.4;
}

.sg-root .sg-signup button[ disabled ] {
	opacity: 0.6;
	cursor: default;
}

.sg-formnote {
	min-height: 1.4em;
	font-size: 0.88rem;
	color: var( --sg-blossom );
	margin: 10px 0 0;
}

.sg-formnote--ok {
	color: var( --sg-gold );
}

.sg-smallprint {
	font-size: 0.82rem;
	color: var( --sg-sage );
	margin: 0;
}

@media ( prefers-reduced-motion: reduce ) {
	.sg-root *,
	.sg-root *::before,
	.sg-root *::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}

/* ------------------------------------------------------- full canvas --- */
/*
 * When the full-canvas page template is in use there is no theme container to
 * break out of, so the 100vw trick above is not only unnecessary, it causes a
 * horizontal scrollbar: 100vw includes the scrollbar's own width.
 */

body.sg-canvas {
	margin: 0;
	padding: 0;
	background: #0C1520;
}

body.sg-canvas .sg-root {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}
