/**
 * Cedar Coasters — base design system
 * Tokens aligned with grok/ref/global.yaml
 */

:root {
	/* Surfaces */
	--cc-canvas: #f6f1e8;
	--cc-surface: #ffffff;
	--cc-surface-muted: #efe8dc;
	--cc-surface-inverse: #2c2c2c;

	/* Text */
	--cc-text: #464646;
	--cc-text-muted: #6b6b6b;
	--cc-text-on-dark: #ffffff;

	/* Brand */
	--cc-cedar: #8b5a2b;
	--cc-cedar-deep: #5c3a1e;
	--cc-link: #0060b6;
	--cc-navy: #003552;
	--cc-red: #ca242f;
	--cc-success: #198754;
	--cc-price: #228b22;
	--cc-info: #788b9f;
	--cc-border: #e2d9c9;
	--cc-border-strong: #c9bca8;
	--cc-focus: #0060b6;

	/* Elevation */
	--cc-shadow-sm: 0 1px 2px rgba(44, 44, 44, 0.06);
	--cc-shadow-md: 0 4px 16px rgba(44, 44, 44, 0.10);
	--cc-shadow-lg: 0 12px 32px rgba(44, 44, 44, 0.14);
	--cc-shadow-focus: 0 0 0 3px rgba(0, 96, 182, 0.35);

	/* Radius */
	--cc-radius-sm: 4px;
	--cc-radius-md: 8px;
	--cc-radius-lg: 12px;
	--cc-radius-pill: 999px;

	/* Motion */
	--cc-fast: 150ms;
	--cc-normal: 250ms;
	--cc-easing: ease;

	/* Type */
	--cc-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--cc-font-display: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
	--cc-container: 1140px;
}

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

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--cc-font-sans);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--cc-text);
	background-color: var(--cc-canvas);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Lazy-loaded images: hold layout, fade in when ready */
img.cc-lazy {
	background-color: var(--cc-surface-muted);
	opacity: 0.35;
	transition: opacity var(--cc-normal) var(--cc-easing);
}

img.cc-lazy.cc-lazy--loaded {
	opacity: 1;
	background-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
	img.cc-lazy {
		opacity: 1;
		transition: none;
	}
}

a {
	color: var(--cc-link);
	text-decoration: none;
	transition: color var(--cc-fast) var(--cc-easing);
}

a:hover {
	color: var(--cc-cedar-deep);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible {
	outline: none;
	box-shadow: var(--cc-shadow-focus);
}

/* -------------------------------------------------------------------------- */
/* Layout shell                                                                 */
/* -------------------------------------------------------------------------- */

.cc-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.cc-main {
	flex: 1 0 auto;
}

.cc-container {
	width: 100%;
	max-width: var(--cc-container);
	margin-inline: auto;
	padding-inline: 1.25rem;
}

/* -------------------------------------------------------------------------- */
/* Site header (matches footer: surface-inverse)                                */
/* -------------------------------------------------------------------------- */

.cc-header {
	position: sticky;
	top: 0;
	z-index: 1030;
	background: var(--cc-surface-inverse);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	color: var(--cc-text-on-dark);
}

.cc-header .navbar {
	padding-block: 0.75rem;
}

.cc-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	color: var(--cc-text-on-dark) !important;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-decoration: none !important;
}

.cc-brand:hover {
	color: #fff !important;
}

.cc-brand:hover .cc-brand-tag {
	color: rgba(255, 255, 255, 0.85);
}

.cc-brand-mark {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	object-fit: contain;
	display: block;
}

.cc-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.cc-brand-name {
	font-size: 1.1rem;
	font-weight: 700;
	color: inherit;
}

.cc-brand-tag {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
}

.cc-header .nav-link {
	color: rgba(255, 255, 255, 0.85) !important;
	font-weight: 500;
	padding: 0.5rem 0.9rem !important;
	border-radius: var(--cc-radius-md);
	transition: background var(--cc-fast) var(--cc-easing), color var(--cc-fast) var(--cc-easing);
}

.cc-header .nav-link:hover,
.cc-header .nav-link:focus {
	background: rgba(255, 255, 255, 0.08);
	color: #fff !important;
}

.cc-header .nav-link.active {
	background: var(--cc-cedar);
	color: var(--cc-text-on-dark) !important;
}

.cc-header .navbar-toggler {
	border-color: rgba(255, 255, 255, 0.35);
	padding: 0.4rem 0.55rem;
}

.cc-header .navbar-toggler:focus {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.cc-header .navbar-toggler-icon {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Collapsed mobile menu sits on the dark header */
@media (max-width: 991.98px) {
	.cc-header .navbar-collapse {
		margin-top: 0.5rem;
		padding: 0.5rem 0 0.25rem;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
	}
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                      */
/* -------------------------------------------------------------------------- */

.btn-cc {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.7rem 1.25rem;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.25;
	border-radius: var(--cc-radius-md);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none !important;
	transition: background var(--cc-fast) var(--cc-easing),
		color var(--cc-fast) var(--cc-easing),
		border-color var(--cc-fast) var(--cc-easing);
}

.btn-cc .material-icons {
	font-size: 1.1rem;
}

.btn-cc-primary {
	background: var(--cc-cedar);
	color: var(--cc-text-on-dark) !important;
	border-color: var(--cc-cedar);
}

.btn-cc-primary:hover {
	background: var(--cc-cedar-deep);
	border-color: var(--cc-cedar-deep);
	color: var(--cc-text-on-dark) !important;
}

.btn-cc-secondary {
	background: transparent;
	border-color: var(--cc-border-strong);
	color: var(--cc-text) !important;
}

.btn-cc-secondary:hover {
	background: var(--cc-surface);
	border-color: var(--cc-cedar);
	color: var(--cc-cedar-deep) !important;
}

.btn-cc-inverse {
	background: var(--cc-surface);
	color: var(--cc-text) !important;
	border-color: var(--cc-surface);
}

.btn-cc-inverse:hover {
	background: var(--cc-canvas);
	color: var(--cc-text) !important;
}

.btn-cc-lg {
	padding: 1rem 1.85rem;
	font-size: 1.05rem;
}

/* -------------------------------------------------------------------------- */
/* Typography helpers                                                           */
/* -------------------------------------------------------------------------- */

.cc-eyebrow {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cc-cedar);
	margin-bottom: 0.75rem;
}

.cc-section-title {
	font-family: var(--cc-font-display);
	font-size: clamp(1.5rem, 2.5vw, 1.85rem);
	font-weight: 600;
	color: var(--cc-text);
	line-height: 1.25;
	margin-bottom: 0.5rem;
}

.cc-lead {
	font-size: 1.125rem;
	color: var(--cc-text-muted);
	line-height: 1.7;
	max-width: 40rem;
}

.cc-section {
	padding-block: 3.25rem;
}

@media (max-width: 768px) {
	.cc-section {
		padding-block: 2.5rem;
	}
}

/* -------------------------------------------------------------------------- */
/* Cards                                                                        */
/* -------------------------------------------------------------------------- */

.cc-card {
	background: var(--cc-surface);
	border: 1px solid var(--cc-border);
	border-radius: var(--cc-radius-md);
	height: 100%;
}

.cc-card:hover {
	border-color: var(--cc-border-strong);
}

.cc-card-body {
	padding: 1.5rem;
}

.cc-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: var(--cc-radius-md);
	background: rgba(139, 90, 43, 0.1);
	color: var(--cc-cedar);
	margin-bottom: 1rem;
}

.cc-card-icon .material-icons {
	font-size: 1.5rem;
}

.cc-card h3 {
	font-size: 1.15rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--cc-text);
}

.cc-card p {
	margin: 0;
	color: var(--cc-text-muted);
	font-size: 0.95rem;
}

/* Product / category cards */
.cc-product-card {
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.cc-product-media {
	aspect-ratio: 4 / 3;
	background: var(--cc-surface-muted);
	position: relative;
	border-bottom: 1px solid var(--cc-border);
	overflow: hidden;
}

.cc-product-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cc-product-badge {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 1;
	background: var(--cc-navy);
	color: var(--cc-text-on-dark);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.3rem 0.55rem;
	border-radius: var(--cc-radius-sm);
}



.cc-product-card .cc-card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.cc-product-card .cc-card-link {
	margin-top: auto;
	padding-top: 1rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--cc-cedar);
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.cc-product-card .cc-card-link .material-icons {
	font-size: 1rem;
}

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

.cc-footer {
	background: var(--cc-surface-inverse);
	color: var(--cc-text-on-dark);
	padding-block: 3rem 1.75rem;
	margin-top: auto;
}

.cc-footer a {
	color: rgba(255, 255, 255, 0.85);
}

.cc-footer a:hover {
	color: #fff;
}

.cc-footer h2 {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 0.85rem;
}

.cc-footer-link {
	display: block;
	font-size: 0.9rem;
	margin-bottom: 0.4rem;
	text-decoration: none !important;
}

.cc-footer-meta {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.5;
}

.cc-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	margin-top: 2rem;
	padding-top: 1.25rem;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.55);
}

.cc-footer-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 700;
	color: #fff !important;
	text-decoration: none !important;
	margin-bottom: 0.5rem;
}

.cc-footer-brand .cc-brand-mark {
	width: 36px;
	height: 36px;
	/* Keep logo colors on dark footer; transparent bg already */
	object-fit: contain;
}

.cc-footer-brand .cc-brand-name {
	font-size: 1rem;
	color: #fff;
}

.cc-footer-brand .cc-brand-tag {
	color: rgba(255, 255, 255, 0.65);
}

/* -------------------------------------------------------------------------- */
/* Utilities                                                                    */
/* -------------------------------------------------------------------------- */

.cc-muted {
	color: var(--cc-text-muted);
}

.cc-band-muted {
	background: var(--cc-surface-muted);
}

.cc-band-surface {
	background: var(--cc-surface);
}

.text-cedar {
	color: var(--cc-cedar) !important;
}
