/* Sleep Sounds Online: global styles that Elementor Site Settings cannot express.
   Colours and fonts are set in Elementor (Site Settings > Global Colours / Fonts) and arrive here as
   --e-global-color-* and --e-global-typography-* variables, so editing them there updates this file too.
   The kit styles every <button> like the gold call-to-action and every <a> in gold, and Hello's
   reset.css adds its own focus rings, so selectors here start with "html body" to win cleanly. */

:root {
	color-scheme: dark;
	--sso-radius: 16px;
	--sso-radius-s: 10px;
	--sso-header-h: 72px;
	--sso-dim-media: 1;
	--sso-ease: cubic-bezier(.22, .9, .36, 1);
	--sso-fade: .6s ease;
}

/* ---------- Extra dark: same layout, lower light (values from the approved build) ---------- */

html[data-brightness="extra"] { --sso-dim-media: .68; }

html[data-brightness="extra"] body[class*="elementor-kit-"] {
	--e-global-color-primary: #C9AD6F;
	--e-global-color-accent: #D5BD85;
	--e-global-color-secondary: #080D1F;
	--e-global-color-text: #CDD3E2;
	--e-global-color-ssobg: #04060F;
	--e-global-color-ssobg2: #060919;
	--e-global-color-ssopanel2: #0B1226;
	--e-global-color-ssomuted: #7D8699;
}

body,
html body .sso-header,
html body .sso-footer {
	transition: background-color var(--sso-fade), color var(--sso-fade);
}

.elementor img { transition: filter var(--sso-fade); }
html[data-brightness="extra"] .elementor img:not(.sso-no-dim) { filter: brightness(var(--sso-dim-media)); }

/* ---------- Basics ---------- */

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--sso-header-h) + 16px);
}

::selection { background: var(--e-global-color-ssogolddim, rgba(233, 200, 126, .35)); }

/* One gold focus ring for everything a keyboard can reach. No border-radius here: the outline
   follows each element's own shape (round buttons stay round). */
html body :is(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
	outline: 2px solid var(--e-global-color-primary, #E9C87E);
	outline-offset: 3px;
}
html body :is(input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible { box-shadow: none; }
html body :is(.elementor-widget-text-editor, .elementor-widget-theme-post-content) a:focus-visible { border-radius: 2px; }

/* Links inside running text are underlined, so colour is not the only clue. */
html body :is(.elementor-widget-text-editor, .elementor-widget-theme-post-content) a:not(.elementor-button) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
	text-decoration-color: var(--e-global-color-ssogolddim);
	transition: text-decoration-color .2s ease, color .2s ease;
}
html body :is(.elementor-widget-text-editor, .elementor-widget-theme-post-content) a:not(.elementor-button):hover {
	text-decoration-color: currentColor;
}

/* Skip link (Hello prints it; its own styles were in the theme.css we no longer load). */
html body .skip-link.screen-reader-text:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	margin: 0;
	clip: auto;
	clip-path: none;
	overflow: visible;
	padding: 12px 20px;
	border-radius: 999px;
	background: var(--e-global-color-primary, #E9C87E);
	color: #241A05;
	font-weight: 600;
	text-decoration: none;
	z-index: 100000;
}
html body main#content:focus { outline: none; }

/* ---------- Buttons ---------- */

/* Every button that is not an Elementor button starts plain, in all states, so the kit's gold
   call-to-action style never leaks onto icon buttons, the player or form controls. */
html body button:not(.elementor-button),
html body button:not(.elementor-button):is(:hover, :focus, :active) {
	background-color: transparent;
	background-image: none;
	box-shadow: none;
	color: inherit;
	text-decoration: none;
}
html body button:not(.elementor-button) {
	padding: 0;
	border: 0;
	border-radius: 0;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
}

/* Elementor buttons (the kit's gold style): soft lift where hovering exists, a press on touch. */
html body .elementor-button {
	transition: transform .25s var(--sso-ease), box-shadow .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}
@media (hover: hover) {
	html body .elementor-button:hover { transform: translateY(-2px); }
}
html body .elementor-button:active { transform: translateY(0) scale(.98); }

/* Second button style: add the CSS class "sso-btn-ghost" to a Button widget. */
html body .elementor-widget.sso-btn-ghost .elementor-button,
html body .elementor-widget.sso-btn-ghost .elementor-button:is(:hover, :focus) {
	color: var(--e-global-color-text);
	background-color: rgba(10, 16, 34, .38);
	background-image: none;
	border: 1px solid rgba(255, 255, 255, .2);
	box-shadow: none;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}
@media (hover: hover) {
	html body .elementor-widget.sso-btn-ghost .elementor-button:hover {
		background-color: rgba(16, 24, 48, .55);
		border-color: rgba(255, 255, 255, .34);
	}
}

/* Round icon button (header brightness switch; later the player and Sleep Mode controls). */
html body button.sso-icon-btn,
html body button.sso-icon-btn:is(:focus, :active) {
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--e-global-color-ssoline);
	border-radius: 50%;
	background-color: transparent;
	color: var(--e-global-color-ssomuted);
	transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .15s ease;
}
html body button.sso-icon-btn svg { width: 19px; height: 19px; }
@media (hover: hover) {
	html body button.sso-icon-btn:hover {
		color: var(--e-global-color-text);
		border-color: var(--e-global-color-ssoline2);
		background-color: var(--e-global-color-ssopanel2);
	}
}
html body button.sso-icon-btn:active { transform: scale(.95); }
html body button.sso-icon-btn[aria-pressed="true"],
html body button.sso-icon-btn[aria-pressed="true"]:is(:hover, :focus, :active) {
	color: var(--e-global-color-primary);
	border-color: var(--e-global-color-ssogolddim);
}

/* ---------- Form fields ---------- */

html body :is(input, textarea, select):focus { border-color: var(--e-global-color-ssogolddim); }
html body :is(input, textarea)::placeholder { color: var(--e-global-color-ssofaint); opacity: 1; }

/* ---------- Header ---------- */

.elementor-location-header {
	position: sticky;
	top: 0;
	z-index: 40;
}
.admin-bar .elementor-location-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) {
	.admin-bar .elementor-location-header { top: 0; }
}

html body .sso-header {
	background-color: rgba(7, 11, 25, .88);
	background-color: color-mix(in srgb, var(--e-global-color-ssobg) 88%, transparent);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--e-global-color-ssoline);
}
html[data-brightness="extra"] body .sso-header {
	background-color: rgba(4, 6, 15, .88);
	background-color: color-mix(in srgb, var(--e-global-color-ssobg) 88%, transparent);
}

html body .sso-logo {
	display: flex;
	align-items: center;
	min-height: 44px; /* a comfortable tap target */
	gap: 12px;
	color: var(--e-global-color-text);
	text-decoration: none;
	white-space: nowrap;
}
html body .sso-logo svg { width: 40px; height: 30px; flex: none; }
html body .sso-logo__name {
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .12em;
	line-height: 1.25;
	text-transform: uppercase;
}
html body .sso-logo__sub {
	display: block;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: .34em;
	color: var(--e-global-color-ssomuted);
}

html body .sso-header-actions { display: flex; align-items: center; gap: 10px; }

/* Main menu: hover changes colour only; the current page gets a short gold line (approved look). */
html body .sso-nav .elementor-nav-menu--main .elementor-item::after {
	left: 14px;
	right: 14px;
	width: auto;
	bottom: 4px;
	height: 2px;
	border-radius: 2px;
}

/* Elementor's menu button, shaped like the other round header buttons.
   No display value here: Elementor shows and hides it per breakpoint. */
html body .sso-nav .elementor-menu-toggle {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--e-global-color-ssoline);
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
html body .sso-nav .elementor-menu-toggle svg { width: 19px; height: 19px; }
@media (hover: hover) {
	html body .sso-nav .elementor-menu-toggle:hover {
		border-color: var(--e-global-color-ssoline2);
		background-color: var(--e-global-color-ssopanel2);
	}
}
html body .sso-nav .elementor-nav-menu--dropdown { box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .7); }

@media (max-width: 767px) {
	html body .sso-logo__name { font-size: 13px; }
	html body .sso-logo svg { width: 34px; height: 26px; }
	html body .sso-logo { gap: 10px; }
}
@media (max-width: 340px) {
	html body .sso-logo svg { display: none; }
}

/* ---------- Footer ---------- */

html body .sso-footer .elementor-nav-menu--main .elementor-item { text-decoration: none; }
html body .sso-footer-brand { opacity: .85; }

/* ---------- Style guide page (build only) ---------- */

/* Fixed column counts: an auto-fill grid inside an Elementor column container makes Chrome reserve
   the one-column height (a large empty gap on phones). */
html body .sso-swatches {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}
@media (min-width: 640px) { html body .sso-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { html body .sso-swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
html body .sso-swatch {
	border: 1px solid var(--e-global-color-ssoline);
	border-radius: var(--sso-radius-s);
	overflow: hidden;
	font-size: 13px;
	line-height: 1.4;
	color: var(--e-global-color-ssomuted);
	background: var(--e-global-color-secondary);
}
html body .sso-swatch i { display: block; height: 64px; border-bottom: 1px solid var(--e-global-color-ssoline); }
html body .sso-swatch span { display: block; padding: 10px 12px; }
html body .sso-swatch b { display: block; color: var(--e-global-color-text); font-weight: 600; }
html body .sso-swatch em { font-style: normal; }
html body .sso-field-demo { display: grid; gap: 8px; max-width: 420px; }
html body .sso-field-demo label { color: var(--e-global-color-text); font-size: 15px; font-weight: 500; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
	html body .elementor-button:hover { transform: none; }
}
