/*******************************************************************************
 * Scaffold — a reusable frontend with theming support
 * Core Styles (/assets/styles/scaffold/core.css)
 * (C) 2026 Fully Immersive Attractions LLC
 * Design by Rudy Valencia
 ******************************************************************************/

 /* TOKENS (ROOT VARIABLES)*/

:root {
	/* Colors */
	--color-bg: #fff;
	--color-bg-alt: #f8f8f8;
	--color-surface-bg: #f5f5f5;
	--color-surface-alt: #ebebeb;

	--color-text: #111;
	--color-text-muted: #333;
	--color-border: rgba(0, 0, 0, 0.12);

	--color-brand: #2c3e50;
	--color-brand-hover: #243444;
	--color-text-on-brand: #fff;
	--color-border-on-brand: rgba(255,255,255,0.15);
	--color-link-on-brand: var(--color-link);
	--color-link-on-brand-hover: var(--color-link-hover);

	--color-accent: #2563eb;
	--color-accent-hover: #1d4ed8;
	--color-accent-contrast: #fff;

	/* Links */
	--color-link: var(--color-accent);
	--color-link-hover: var(--color-accent-hover);
	--color-body-link: var(--color-accent);
	--color-body-link-hover: var(--color-accent-hover);

	/* Typography */
	--font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-heading: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	/* Type scale */
	--text-xs: 0.75rem;
	--text-sm: 0.875rem;
	--text-md: 1rem;
	--text-lg: 1.25rem;
	--text-xl: 2rem;
	--text-2xl: 3rem;

	--line-height-body: 1.6;
	--line-height-heading: 1.2;

	/* Layout */
	--container-max: 72rem;
	--gutter: 1rem;
	--section-spacing: 2.5rem;
	--header-height: 4.5rem;
	--header-min-height: 4rem;

	/* Spacing */
	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 1rem;
	--space-4: 1.5rem;
	--space-5: 2rem;

	/* Radius / Shadow */
	--radius-sm: 0.25rem;
	--radius-md: 0.5rem;

	--shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
	--shadow-md: 0 4px 12px rgba(0,0,0,0.15);

	/* Transitions */
	--transition-fast: 150ms ease;
	--transition-base: 180ms ease;
}

/* DARK MODE TOKEN OVERRIDES */

@media (prefers-color-scheme: dark) {
	:root {
		/* Colors */
		--color-bg: #121212;
		--color-bg-alt: #181818;
		--color-surface-bg: #1c1c1c;
		--color-surface-alt: #242424;

		--color-text: #f5f5f5;
		--color-text-muted: #cfcfcf;
		--color-border: rgba(255, 255, 255, 0.12);

		--color-brand: #3b4f66;
		--color-brand-hover: #4a617b;

		--color-accent: #6ea8ff;
		--color-accent-hover: #8bbaff;
		--color-accent-contrast: #111;

		/* Links */
		--color-link: var(--color-accent);
		--color-link-hover: var(--color-accent-hover);
		--color-body-link: var(--color-accent);
		--color-body-link-hover: var(--color-accent-hover);

		/* Shadows */
		--shadow-sm: 0 1px 3px rgba(0,0,0,0.35);
		--shadow-md: 0 4px 12px rgba(0,0,0,0.4);
	}
}

/* RESET/BASE STYLES */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	background: var(--color-bg);
	color: var(--color-text);

	/* Default browser base: 1rem ≈ 16px */
	font-size: 100%;
}

body {
	font-family: var(--font-body);
	font-variant-ligatures: common-ligatures;
	font-size: var(--text-md);  /* ~16px at default base */
	line-height: var(--line-height-body);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: var(--line-height-heading);
	margin-bottom: var(--space-3);
}

p { margin-bottom: 1.2rem; }

code, pre, var, kbd, samp { font-family: var(--font-mono); }

a:link, a:visited { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); }

main a:link, main a:visited { color: var(--color-body-link); }
main a:hover { color: var(--color-body-link-hover); }

/* CONTAINER, PAGE, SURFACES */

.sc-container {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* Page and surface spacing */
.sc-page {
	padding: 1.5rem var(--gutter);
}

.sc-surface {
	background: var(--color-surface-bg);
	padding: 1rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	margin-bottom: 1.2rem;
}

/* Make sure the last child of a page, surface, or container doesn't
	 inherit the bottom margin (e.g. from a paragraph/list/etc.) */
.sc-page > :last-child,
.sc-surface > :last-child,
.sc-container > :last-child {
	margin-bottom: 0;
}

/* Set main to fill available space */
main {
	flex: 1;
}

/* Fix ordered and unordered lists in the main content and surfaces
	 (after the CSS reset above removed default styles) */
main ul,
main ol,
.sc-surface ul,
.sc-surface ol {
	margin: 0 0 1rem 0;
	padding-left: 1rem;
}

main ul,
.sc-surface ul {
	list-style: disc;
}

main ol,
.sc-surface ol {
	list-style: decimal;
}

main li,
.sc-surface li {
	margin: 0.25rem 0;
	padding-left: 0.25rem;
}

/* ACCESSIBILITY */

.sc-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--color-surface-bg);
	color: var(--color-accent);
	text-decoration: none;
	padding: 1rem 1.2rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	z-index: 9999;
}

.sc-skip-link:focus,
.sc-skip-link:focus-visible {
	left: 50%;
	top: 1rem;
	transform: translateX(-50%);
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* HEADER */

.sc-header {
	height: var(--header-min-height);
	padding: 0;
	position: sticky;
	top: 0;
	z-index: 900;
	top: env(safe-area-inset-top, 0px);
}

.sc-header .sc-container {
	padding-left: var(--gutter);
	padding-right: 0.875rem;
}

.sc-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem;
	height: var(--header-min-height);
}

.sc-icon {
	width: 1.6rem;
	height: 1.6rem;
	fill: currentColor;
	display: inline-block;
	vertical-align: -0.125em;
}

.sc-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	background: transparent;
	cursor: pointer;
}

/* NAV */

.sc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.55);
	opacity: 0;
	transition: opacity var(--transition-base);
	z-index: 1000;
}

.sc-overlay.is-open {
	opacity: 1;
}

.sc-nav {
	position: fixed;
	top: 0;
	right: 0;
	width: min(84vw, 34rem);
	height: 100dvh;
	transform: translateX(100%);
	transition: transform var(--transition-base);
	z-index: 1001;
}

.sc-nav.is-open {
	transform: translateX(0);
}

.sc-nav__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-min-height);
	padding-left: var(--gutter);
	padding-right: 0.875rem;
}

.sc-nav__title {
	font-family: var(--font-heading);
	font-weight: 600;
	letter-spacing: 0.02em;
}

.sc-nav__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.sc-nav__list {
	list-style: none;
	margin: 0;
	padding: 1.2rem;
	display: grid;
	gap: 0.6rem;
}

.sc-nav__link:link,
.sc-nav__link:visited {
	display: block;
	padding: 1.2rem 1.2rem;
	border: 1px solid var(--color-border);
	border-radius: 1rem;
	text-decoration: none;
	font-family: var(--font-heading);
	font-weight: 600;
	color: var(--color-text);
}

.sc-no-scroll {
	overflow: hidden;
}

/* FOOTER */

.sc-footer {
	text-align: center;
	padding: 1rem 0;
	background: var(--color-brand);
	color: var(--color-text-on-brand);
	border-top: 1px solid var(--color-border-on-brand);
}

.sc-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.6rem;
	padding: 0 var(--gutter);
}

.sc-footer__contact {
	margin-top: 1rem;
}

.sc-footer__social {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-top: 0.75rem;
}

.sc-footer__social svg {
	width: 1.5rem;
	height: 1.5rem;
	fill: currentColor;
	transition: color var(--transition-fast);
}

.sc-footer__section h2 {
	margin: 0.5rem 0 1rem;
	color: inherit;
}

.sc-footer__section ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sc-footer__section li + li {
	margin-top: 0.35rem;
}

.sc-footer__legal {
	margin-top: 2.5rem;
	font-style: italic;
	color: var(--color-text-muted-on-brand);
}

.sc-footer__legal p {
	margin-bottom: 0;
}

@media (min-width: 48rem) {
	.sc-header,
	.sc-header__inner {
		height: var(--header-height);
	}

	.sc-nav {
		position: static;
		inset: auto;
		width: auto;
		height: auto;
		transform: none;
		transition: none;

		background: transparent;
		border: 0;
		box-shadow: none;
	}

	#sc-nav[hidden] {
		display: block;
	}

	.sc-nav__header {
		height: var(--header-height);
		display: none;
	}

	.sc-menu-btn {
		display: none;
	}

	.sc-nav__list {
		display: flex;
		align-items: center;
		gap: 1.25rem;
		padding: 0;
		margin: 0;
		list-style: none;
	}

	.sc-nav__link:link,
	.sc-nav__link:visited {
		display: inline-block;
		width: auto;

		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;

		text-decoration: none;
		font-family: var(--font-heading);
		font-weight: 600;
	}

	.sc-card-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.sc-footer__grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 2rem;
	}
}