/*
	Sleep Sounds / Sleep Songs landing pages.
	Matches the apps: dark brushed-metal slate, rounded photo tiles with bottom-left labels, glass circle
	buttons, uppercase section labels and the lime-green LED level meter.
	Everything is scoped to body.sleepapp so the rest of the site (main.css, modern.css) is untouched.
*/

body.sleepapp {
	/* Measured from the app's screenshots */
	--sl-ink: #ffffff;
	--sl-muted: #a9b4b7;
	--sl-faint: #7d8b8f;
	--sl-metal: #252b2d;           /* the brushed-metal background's average color */
	--sl-row: #232a2b;             /* Settings rows and grouped cards */
	--sl-glass: rgba(20, 25, 27, 0.55);
	--sl-glass-strong: #343a3c;    /* the round glass buttons (gear, plus, back) */
	--sl-line: rgba(255, 255, 255, 0.09);
	--sl-led: #a3e017;             /* LED meter green */
	--sl-red: #df1435;             /* LED meter peak */
	--sl-green: #30d158;           /* iOS toggle green */
	--sl-blue: #1e7ee9;            /* the editor's checkmark blue */
	--sl-radius: 18px;
	--sl-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);

	margin: 0;
	min-width: 0;
	color: var(--sl-ink);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background-color: var(--sl-metal);
}

/* The brushed-metal texture, stretched once to fill the window (no tiling). It sits in a fixed layer behind
   the page, so it also works on iOS Safari, which ignores background-attachment: fixed. */
body.sleepapp::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0, rgba(0, 0, 0, 0) 520px),
		url(../../Images/Mobile/sleep/metal.jpg);
	background-size: 100% 100%, 100% 100%;
	background-repeat: no-repeat, no-repeat;
	background-position: center top, center;
	pointer-events: none;
}

body.sleepapp *,
body.sleepapp *::before,
body.sleepapp *::after {
	box-sizing: border-box;
}

body.sleepapp a {
	color: inherit;
	text-decoration: none;
	border-bottom: 0;
}

body.sleepapp img {
	max-width: 100%;
}

body.sleepapp h1,
body.sleepapp h2,
body.sleepapp h3,
body.sleepapp p {
	margin: 0;
	color: var(--sl-ink);
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

body.sleepapp :focus-visible {
	outline: 3px solid var(--sl-led);
	outline-offset: 3px;
	border-radius: 10px;
}

.sl-wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 22px;
}

/* Icons come from the SVG sprite in the layout (#i-...) */

body.sleepapp .sl-i {
	display: block;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- Top bar ---------- */

body.sleepapp .sl-top {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(0, 0, 0, 0.82);
	-webkit-backdrop-filter: saturate(160%) blur(18px);
	backdrop-filter: saturate(160%) blur(18px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.sleepapp .sl-top .sl-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 60px;
	gap: 16px;
}

body.sleepapp .sl-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px 8px 10px;
	border-radius: 999px;
	background: var(--sl-glass-strong);
	border: 1px solid var(--sl-line);
	font-size: 15px;
	font-weight: 600;
	transition: background 0.2s;
}

body.sleepapp .sl-back:hover {
	background: #444b4e;
}

body.sleepapp .sl-back svg {
	width: 18px;
	height: 18px;
}

body.sleepapp .sl-links {
	display: flex;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

body.sleepapp .sl-links li {
	margin: 0;
	padding: 0;
}

body.sleepapp .sl-links a {
	display: block;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 500;
	color: var(--sl-muted);
	transition: color 0.2s, background 0.2s;
}

body.sleepapp .sl-links a:hover {
	color: var(--sl-ink);
	background: var(--sl-glass-strong);
}

/* ---------- Hero ---------- */

body.sleepapp .sl-hero {
	padding: 76px 0 36px;
	text-align: center;
}

body.sleepapp .sl-icon {
	width: 136px;
	height: 136px;
	border-radius: 31px;
	box-shadow: var(--sl-shadow), 0 0 0 1px rgba(255, 255, 255, 0.16);
}

body.sleepapp .sl-title {
	margin-top: 26px;
	font-size: clamp(42px, 7vw, 68px);
	line-height: 1.04;
	font-weight: 700;
	letter-spacing: -0.03em;
}

body.sleepapp .sl-lead {
	max-width: 660px;
	margin: 18px auto 0;
	font-size: clamp(18px, 2.4vw, 22px);
	line-height: 1.45;
	color: var(--sl-muted);
}

body.sleepapp .sl-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
}

body.sleepapp .sl-chip {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(44, 44, 48, 0.9);
	border: 1px solid var(--sl-line);
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}

body.sleepapp .sl-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 30px;
}

body.sleepapp .sl-cta img {
	height: 54px;
	width: auto;
	display: block;
}

body.sleepapp .sl-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 22px;
	border-radius: 999px;
	background: var(--sl-glass-strong);
	border: 1px solid var(--sl-line);
	font-size: 16px;
	font-weight: 600;
	color: var(--sl-ink);
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}

body.sleepapp .sl-btn:hover {
	background: #444b4e;
	transform: translateY(-1px);
}

body.sleepapp .sl-btn-led {
	background: var(--sl-led);
	border-color: transparent;
	color: #0d1a05;
}

body.sleepapp .sl-btn-led:hover {
	background: #b6ee3a;
}

/* The LED meter from the player screen: two bars of separate cells, with two red cells at the end of each bar.
   The cells are plain <i> elements; sleepapp.js switches them on and off with a moving level. */

body.sleepapp .sl-led {
	width: min(580px, 88%);
	margin: 46px auto 0;
	padding: 14px;
	border-radius: 16px;
	background: rgba(0, 0, 0, 0.36);
	border: 1px solid var(--sl-line);
	display: grid;
	gap: 4px;
}

body.sleepapp .sl-led-row {
	display: flex;
	gap: 3px;
}

body.sleepapp .sl-led-row i {
	flex: 1 1 0;
	min-width: 0;
	aspect-ratio: 1 / 1.95;
	border-radius: 2px;
	border: 1px solid rgba(255, 255, 255, 0.07);
	background: rgba(255, 255, 255, 0.035);
	transition: background-color 0.09s linear, border-color 0.09s linear, box-shadow 0.09s linear;
}

body.sleepapp .sl-led-row i.on {
	background: linear-gradient(180deg, #b4ec3a 0%, #98d51c 100%);
	border-color: #6c990c;
	box-shadow: 0 0 7px rgba(163, 224, 23, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

body.sleepapp .sl-led-row i.red.on {
	background: linear-gradient(180deg, #f24a60 0%, #d6132f 100%);
	border-color: #9a0f26;
	box-shadow: 0 0 7px rgba(223, 20, 53, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* ---------- Sections ---------- */

body.sleepapp .sl-section {
	padding: 56px 0;
	margin: 0;
}

body.sleepapp .sl-kicker {
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--sl-muted);
}

body.sleepapp .sl-h2 {
	font-size: clamp(30px, 4.4vw, 44px);
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.025em;
}

body.sleepapp .sl-sub {
	max-width: 640px;
	margin-top: 12px;
	color: var(--sl-muted);
}

/* ---------- Screenshots ---------- */

body.sleepapp .sl-shots {
	position: relative;
	margin-top: 30px;
}

body.sleepapp .sl-track {
	display: flex;
	gap: 22px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 6px 22px 26px;
	margin: 0 -22px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
	-webkit-overflow-scrolling: touch;
}

body.sleepapp .sl-slide {
	flex: 0 0 min(88vw, 740px);
	margin: 0;
	padding: 14px;
	border-radius: 28px;
	background: var(--sl-row);
	border: 1px solid var(--sl-line);
	scroll-snap-align: center;
	box-shadow: var(--sl-shadow);
}

body.sleepapp .sl-slide img {
	display: block;
	width: 100%;
	height: auto;
}

body.sleepapp .sl-arrow {
	display: none;
	position: absolute;
	top: calc(50% - 30px);
	width: 48px;
	height: 48px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--sl-line);
	background: rgba(0, 0, 0, 0.7);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	color: #fff;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	z-index: 5;
	transition: background 0.2s, opacity 0.2s;
}

body.sleepapp .sl-arrow:hover {
	background: #444b4e;
}

body.sleepapp .sl-arrow[disabled] {
	opacity: 0.25;
	cursor: default;
}

body.sleepapp .sl-arrow svg {
	width: 22px;
	height: 22px;
}

body.sleepapp .sl-arrow-prev { left: -10px; }
body.sleepapp .sl-arrow-next { right: -10px; }

html.sl-js body.sleepapp .sl-arrow { display: flex; }

/* ---------- Feature cards ---------- */

body.sleepapp .sl-features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 16px;
	margin-top: 32px;
}

body.sleepapp .sl-card {
	padding: 24px;
	border-radius: var(--sl-radius);
	background: var(--sl-row);
	border: 1px solid var(--sl-line);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	transition: background 0.25s, transform 0.25s, border-color 0.25s;
}

body.sleepapp .sl-card:hover {
	background: #2a3234;
	border-color: rgba(255, 255, 255, 0.18);
	transform: translateY(-3px);
}

body.sleepapp .sl-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--sl-glass-strong);
	border: 1px solid var(--sl-line);
	color: var(--sl-led);
}

body.sleepapp .sl-card-icon svg {
	width: 24px;
	height: 24px;
}

body.sleepapp .sl-card h3 {
	font-size: 19px;
	line-height: 1.25;
	font-weight: 650;
	margin-bottom: 6px;
}

body.sleepapp .sl-card p {
	font-size: 16px;
	line-height: 1.5;
	color: var(--sl-muted);
}

/* ---------- Tiles (the app's home grid) ---------- */

body.sleepapp .sl-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
	gap: 14px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

body.sleepapp .sl-tile {
	position: relative;
	aspect-ratio: 10 / 7;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border-radius: 18px;
	background: #1b2224;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
	transition: transform 0.25s, box-shadow 0.25s;
}

body.sleepapp .sl-tile:hover {
	transform: translateY(-4px) scale(1.015);
	box-shadow: 0 18px 34px rgba(0, 0, 0, 0.55);
}

body.sleepapp .sl-tile img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

body.sleepapp .sl-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.72) 100%);
}

body.sleepapp .sl-tile .sl-name {
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 11px;
	z-index: 2;
	font-size: 16px;
	font-weight: 650;
	line-height: 1.2;
	color: #fff;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

body.sleepapp .sl-heart {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(36, 44, 48, 0.6);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

body.sleepapp .sl-heart svg {
	width: 17px;
	height: 17px;
}

body.sleepapp .sl-lite {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--sl-led);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #0d1a05;
}

body.sleepapp .sl-legend {
	margin-top: 18px;
	font-size: 14px;
	color: var(--sl-faint);
}

body.sleepapp .sl-legend .sl-lite {
	position: static;
	display: inline-block;
	margin-right: 6px;
}

/* ---------- Devices / Lite ---------- */

body.sleepapp .sl-split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 18px;
	margin-top: 32px;
}

body.sleepapp .sl-panel {
	padding: 30px;
	border-radius: 26px;
	background: var(--sl-row);
	border: 1px solid var(--sl-line);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

body.sleepapp .sl-panel h3 {
	font-size: 24px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.015em;
	margin-bottom: 10px;
}

body.sleepapp .sl-panel p {
	color: var(--sl-muted);
}

body.sleepapp .sl-panel .sl-chips {
	justify-content: flex-start;
	margin-top: 20px;
}

body.sleepapp .sl-panel .sl-btn {
	margin-top: 22px;
}

/* ---------- More apps ---------- */

body.sleepapp .sl-apps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 14px;
	margin-top: 30px;
}

body.sleepapp .sl-app {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 16px 18px 16px 16px;
	border-radius: var(--sl-radius);
	background: var(--sl-row);
	border: 1px solid var(--sl-line);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	transition: background 0.25s, transform 0.25s, border-color 0.25s;
}

body.sleepapp .sl-app:hover {
	background: #2a3234;
	border-color: rgba(255, 255, 255, 0.18);
	transform: translateY(-3px);
}

body.sleepapp .sl-app img {
	flex: 0 0 84px;
	width: 84px;
	height: 84px;
	border-radius: 19px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
	background: #1b2224;
}

body.sleepapp .sl-app-text {
	flex: 1 1 auto;
	min-width: 0;
	display: block;
}

body.sleepapp .sl-app-text strong {
	display: block;
	font-size: 19px;
	line-height: 1.25;
	font-weight: 650;
	color: var(--sl-ink);
}

body.sleepapp .sl-app-text span {
	display: block;
	margin-top: 3px;
	font-size: 15px;
	line-height: 1.4;
	color: var(--sl-muted);
}

body.sleepapp .sl-app-go {
	flex: 0 0 auto;
	color: var(--sl-faint);
}

body.sleepapp .sl-app-go svg {
	width: 20px;
	height: 20px;
}

body.sleepapp .sl-allapps {
	margin-top: 26px;
	text-align: center;
}

/* ---------- Footer / contact ---------- */

body.sleepapp .sl-footer {
	margin-top: 36px;
	padding: 64px 0 44px;
	background: rgba(0, 0, 0, 0.55);
	border-top: 1px solid var(--sl-line);
}

body.sleepapp .sl-contact {
	max-width: 520px;
	margin: 26px auto 0;
	display: grid;
	gap: 12px;
}

body.sleepapp .sl-footer .sl-center {
	text-align: center;
}

body.sleepapp .sl-input {
	width: 100%;
	padding: 14px 16px;
	border-radius: 16px;
	border: 1px solid var(--sl-line);
	background: var(--sl-row);
	color: var(--sl-ink);
	font: inherit;
	font-size: 16px;
	box-shadow: none;
	height: auto;
}

body.sleepapp .sl-input::placeholder {
	color: var(--sl-faint);
}

body.sleepapp textarea.sl-input {
	min-height: 110px;
	resize: vertical;
}

body.sleepapp .field-validation-error,
body.sleepapp .validation-summary-errors {
	color: #ff8aa0;
	font-size: 14px;
}

body.sleepapp .sl-copy {
	margin-top: 40px;
	text-align: center;
	font-size: 14px;
	color: var(--sl-faint);
}

/* ---------- Reveal on scroll (only when JS is running) ---------- */

html.sl-js body.sleepapp .sl-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

html.sl-js body.sleepapp .sl-reveal.sl-in {
	opacity: 1;
	transform: none;
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
	body.sleepapp .sl-links li:not(.sl-keep) {
		display: none;
	}

	body.sleepapp .sl-hero {
		padding-top: 52px;
	}

	body.sleepapp .sl-icon {
		width: 112px;
		height: 112px;
		border-radius: 26px;
	}

	body.sleepapp .sl-section {
		padding: 42px 0;
	}

	body.sleepapp .sl-tiles {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 10px;
	}

	body.sleepapp .sl-arrow {
		display: none !important;
	}

	body.sleepapp .sl-panel {
		padding: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.sleepapp .sl-track {
		scroll-behavior: auto;
	}

	html.sl-js body.sleepapp .sl-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	body.sleepapp .sl-card,
	body.sleepapp .sl-app,
	body.sleepapp .sl-tile,
	body.sleepapp .sl-btn {
		transition: none;
	}
}
