/* Reference Color Palette 
Dark blue (#1B4B7A) - Horn top section
Green (#3B7A57) - Horn middle section
Yellow/Gold (#E3B448) - Horn middle-lower section
Red/Coral (#CB4154) - Horn bottom section
Pretty Significant Bronze (#CD7F32) - Accent color
Brown for the lines (#704214 and #8B4513) - Line details
*/

:root {
	/* Brand Colors from Horn Logo */
	--dark-blue: #1B4B7A;
	--green: #3B7A57;
	--gold: #E3B448;
	--coral: #CB4154;
	--bronze: #CD7F32;
	--dark-brown: #704214;
	--light-brown: #8B4513;

	/* Text Colors */
	--text-dark: rgb(23, 23, 23);
	--text-medium: rgb(75, 85, 99);
	--text-light: rgb(156, 163, 175);

	/* Background Colors */
	--background: rgb(249, 250, 251);
	--background-alt: rgb(243, 244, 246);
	--background-white: #ffffff;

	/* Border Colors */
	--border-light: rgb(229, 231, 235);
	--border-dark: var(--text-dark);

	/* Box Shadow */
	--shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.1);

	/* Content Widths */
	--content-max: 48rem;
	--content-narrow: 38rem;

	/* Responsive Typography */
	--h1-size: clamp(2rem, 5vw, 4.5rem);
	--h2-size: clamp(1.5rem, 4vw, 2.5rem);
	--body-size: clamp(0.9rem, 2vw, 1rem);
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 75%;
		/* Matches your current opacity setting */
	}
}

/* Base Elements */
body {
	background-color: var(--background);
	font-family: sans-serif;
	margin: 0;
	padding: clamp(1rem, 5vw, 3rem);
	color: var(--text-medium);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Layout & Container Elements */
/* NEW */
.container {
	max-width: var(--content-max);
	width: 100%;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	/* Make children take full width */
}

/* Add these child rules */
.container>* {
	/* Direct children of container */
	width: 100%;
	/* Take full width */
	max-width: inherit;
	/* Inherit max-width from container */
}

.container>.text-section,
.container>.technical-section,
.container>.warnings-section {
	max-width: var(--content-narrow);
	/* Override for content sections */
	margin-left: auto;
	margin-right: auto;
}

.container>.footer {
	max-width: var(--content-max);
	/* Force footer to full width */
	margin-left: 0;
	margin-right: 0;
}

/* Content Sections */
.text-section {
	font-family: sans-serif;
	line-height: 1.7;
	max-width: var(--content-narrow);
	margin: 2rem auto;
	color: var(--text-medium);
	text-align: left;
	width: 100%;
	box-sizing: border-box;
	display: block;
	position: relative;
	clear: both;
}

/* Header Components */
.header-container {
	display: flex;
	align-items: center;
	gap: 1rem;
	border-top: 3px solid var(--border-dark);
	padding: 2rem 0;
	margin-bottom: 0;
	width: 100%;
	overflow-x: hidden;
}

.horn-svg {
	width: 180px;
	height: 225px;
}

.text-content {
	flex: 1;
	text-align: center;
}

.main-title {
	font-size: var(--h1-size);
	font-weight: bold;
	font-style: italic;
	letter-spacing: 0.025em;
	margin-bottom: 0.5rem;
	color: var(--text-dark);
}

.header-link {
	text-decoration: none;
	color: inherit;
}

.header-link:hover {
	cursor: pointer;
}

.ipa-notation {
	font-size: 1.5rem;
	color: var(--text-light);
	letter-spacing: 0.1em;
	margin: 0.75rem 0;
}

.subtitle {
	font-family: sans-serif;
	font-size: 0.75rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--text-dark);
	padding-top: 0.75rem;
	margin: 0;
	font-weight: 600;
}

/* Header positioned elements */
.main-title,
.ipa-notation,
.header-decoration {
	position: relative;
	top: -2rem;
}

.subtitle {
	position: relative;
	top: -1.5rem;
}

/* Decorative Elements */
.decoration-base,
.header-decoration,
.story-decoration,
.content-decoration {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 200px;
	margin: 1.5rem auto;
	gap: 0.75rem;
}

.line {
	width: 3rem;
	min-width: 3rem;
	height: 1px;
	background-color: var(--bronze);
}

.diamond {
	width: 0.4rem;
	height: 0.4rem;
	flex-shrink: 0;
	background-color: var(--bronze);
	transform: rotate(45deg);
}

/* Specific decoration variants */
.header-decoration {
	margin: 0.75rem auto;
}

.content-decoration {
	margin: 2rem auto;
}

/* Navigation */
.nav-container {
	border-bottom: 3px solid var(--border-dark);
	padding: 1rem 0;
	margin-bottom: 3rem;
	width: 100%;
}

.nav-list {
	display: flex;
	justify-content: center;
	gap: 1.7rem;
	list-style: none;
	padding: 0;
	margin: 0;
	flex-wrap: wrap;
}

.nav-link {
	font-family: sans-serif;
	text-decoration: none;
	color: var(--text-light);
	font-size: 0.875rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	transition: color 0.2s ease;
	font-weight: normal;
	white-space: nowrap;
}

.nav-link:hover {
	color: var(--bronze);
}

/* Breadcrumb Navigation */
.breadcrumb {
	padding: 0;
	margin: -2rem 0 1rem;
	/* Removed 'auto' */
	font-family: sans-serif;
	font-size: 0.875rem;
	color: var(--text-light);
	max-width: var(--content-max);
	/* Changed to full width */
	width: 100%;
}

.breadcrumb a {
	color: var(--text-light);
	text-decoration: none;
	transition: color 0.2s;
}

.breadcrumb a:hover {
	color: var(--bronze);
}

.breadcrumb span::before {
	content: "/";
	padding: 0 0.5rem;
	color: var(--bronze);
}

/* Story Header */
.story-header {
	color: var(--text-medium);
	margin: 0;
	position: relative;
}

.story-header h2,
.story-header h4,
.story-decoration {
	text-align: center;
}

.story-header h2 {
	font-size: 1.5rem;
	margin-bottom: -1.5rem;
}

.story-header h4 {
	font-size: 0.9rem;
	color: var(--text-light);
	font-weight: normal;
	font-style: italic;
	margin-bottom: -1.5rem;
}

/* Special Content Elements */
.content-refrain {
	font-style: italic;
	text-align: center;
	color: var(--text-medium);
	padding: 2rem 0;
	position: relative;
	max-width: 22em;
	margin: 2rem auto;
}

.content-refrain::before,
.content-refrain::after {
	content: "";
	position: absolute;
	width: 4rem;
	height: 1px;
	background-color: var(--bronze);
	top: 50%;
}

.content-refrain::before {
	right: 100%;
	margin-right: 1rem;
}

.content-refrain::after {
	left: 100%;
	margin-left: 1rem;
}

.content-refrain.future {
	font-weight: 500;
	color: var(--text-medium);
}

/* Name Explanation Box */
.name-explanation {
	position: absolute;
	left: calc(55% - 53rem);
	top: 26rem;
	width: 10rem;
	font-family: sans-serif;
	font-style: italic;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--text-medium);
	background-color: var(--background-alt);
	padding: 3.7rem 2rem 2rem 3rem;
	border-left: 4px solid var(--bronze);
	opacity: 75%;
	margin-left: 3rem;
	/* Add these animation properties */
	animation: fadeIn 1s ease-in forwards;
	/* 'forwards' keeps the final state (75% opacity) */
}

.horn-name-svg {
	float: left;
	width: 3.5rem !important;
	opacity: 1 !important;
	stroke: var(--text-dark) !important;
	stroke-width: 3 !important;
	margin-left: -3rem;
	margin-top: -3.7rem;
}

/* Contributors Note */
.contributors-note {
	position: relative;
	font-style: italic;
	padding: 3rem;
	margin: 2rem auto;
	background-color: var(--background-alt);
	border-left: 4px solid var(--bronze);
	color: var(--text-medium);
	max-width: var(--content-narrow);
	width: 100%;
	box-sizing: border-box;
}

.horn-contributor-svg {
	width: 3rem !important;
	float: left;
	margin-top: -3rem;
	margin-left: -3rem;
	stroke: var(--text-dark) !important;
}

/* Warnings Section */
.warnings-section {
	margin: 2rem auto;
	padding: 2rem 3rem;
	background-color: var(--background-alt);
	border: 1px solid var(--bronze);
	border-radius: 4px;
	max-width: var(--content-narrow);
	width: 100%;
	box-sizing: border-box;
}

.warnings-section h3 {
	color: var(--text-dark);
	font-size: 1.1rem;
	margin-bottom: 1.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--bronze);
}

.warnings-section p {
	margin-bottom: 1rem;
}

.warnings-section p:last-child {
	font-weight: 500;
}

.horn-warnings-svg {
	width: 3rem !important;
	float: left;
	margin-top: -2.1rem;
	margin-left: -3rem;
	stroke: var(--text-dark) !important;
}

/* Technical Section */
.technical-section {
	margin: 0rem auto;
	max-width: var(--content-narrow);
	width: 100%;
	box-sizing: border-box;
	contain: layout;
	/* Contain the layout effects */
	position: relative;
	/* New stacking context */
	z-index: 1;
	/* Ensure proper stacking */
}

.section-title {
	font-family: sans-serif;
	font-size: 1.5rem;
	color: var(--text-dark);
	margin-bottom: 2rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--border-dark);
}

.drawing-container {
	background-color: var(--background-white);
	padding: 2rem;
	margin: 2rem auto;
	/* Changed from 2rem 0 */
	border: 1px solid var(--border-light);
	box-shadow: var(--shadow-soft);
	width: 100%;
	box-sizing: border-box;
	position: relative;
	/* Keep contained */
	z-index: 1;
	/* Stack properly */
}

.drawing-container img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0;
}

.drawing-notes {
	font-family: sans-serif;
	font-size: 0.9rem;
	color: var(--text-medium);
	background-color: var(--background-alt);
	padding: 1.5rem;
	margin-top: 2rem;
}

.drawing-notes h3 {
	font-size: 1rem;
	color: var(--text-dark);
	margin: 0 0 1rem 0;
}

.drawing-notes ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.drawing-notes li {
	margin-bottom: 0.75rem;
	padding-left: 1.5rem;
	position: relative;
}

.drawing-notes li::before {
	content: "•";
	position: absolute;
	left: 0;
	color: var(--text-dark);
}

/* Footer */
/* NEW */
.footer {
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border-light);
	font-family: sans-serif;
	font-size: 0.8rem;
	color: var(--text-light);
	line-height: 1.6;
	width: 100%;
	/* Match container width */
	max-width: var(--content-max);
	/* But don't exceed max */
	margin-left: 0;
	/* Remove auto margins */
	margin-right: 0;
	/* Remove auto margins */
	box-sizing: border-box;
	padding: 0;
	/* Remove padding */
}

.footer p {
	margin: 0.5rem 0;
}

.footer.container {
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border-light);
	font-family: sans-serif;
	font-size: 0.8rem;
	color: var(--text-light);
	line-height: 1.6;
	width: 100%;
	max-width: var(--content-max);
	contain: layout;
	/* Contain the layout effects */
	position: relative;
	/* New stacking context */
	z-index: 2;
	/* Stack above technical sections */
	clear: both;
	/* Clear any floats */
}

/* Privacy Notice */
.privacy-notice {
	font-family: sans-serif;
	line-height: 1.7;
	color: var(--text-medium);
	max-width: var(--content-max);
	margin: 3rem auto;
	width: 100%;
	box-sizing: border-box;
}

.privacy-notice h2 {
	font-size: 1.5rem;
	color: var(--text-dark);
	margin-bottom: 2rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--border-dark);
}

.privacy-notice section {
	margin-bottom: 2rem;
}

.privacy-notice h3 {
	font-size: 1.1rem;
	color: var(--text-dark);
	margin: 1.5rem 0 1rem 0;
}

.progress-bar {
	position: fixed;
	top: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--bronze);
	z-index: 1000;
	transition: width 0.1s;
}

.section-spacer {
	display: flex;
	justify-content: center;
	margin: 3rem 0;
}

.section-spacer .diamond {
	width: 0.3rem;
	/* Slightly smaller than your current diamonds */
	height: 0.3rem;
	background-color: var(--bronze);
	transform: rotate(45deg);
	opacity: 0.8;
	/* A bit softer */
}

/* Build Sequence Navigation */
.build-sequence {
	display: flex;
	justify-content: space-between;
	margin: 4rem 0 2rem;
	padding: 1rem 0;
	border-top: 1px solid var(--border-light);
	width: 100%;
	max-width: var(--content-narrow);
	margin-left: auto;
	margin-right: auto;
}

.prev-step,
.next-step {
	max-width: 45%;
}

.prev-step {
	text-align: left;
}

.next-step {
	text-align: right;
	margin-left: auto;
}

.prev-step a,
.next-step a {
	color: var(--text-medium);
	text-decoration: none;
	transition: color 0.2s;
	font-size: 0.9rem;
	display: inline-block;
	padding: 0.5rem 0;
}

.prev-step a:hover,
.next-step a:hover {
	color: var(--bronze);
}

.prev-step a:before {
	content: "← ";
}

.next-step a:after {
	content: " →";
}

/* kepboard navigation */
:focus {
	outline: 2px solid var(--bronze);
	outline-offset: 2px;
}

.nav-link:focus-visible {
	outline: 2px solid var(--bronze);
	outline-offset: 2px;
}




/* Media Queries */
@media (max-width: 1400px) {
	.name-explanation {
		position: static;
		width: auto;
		margin: 3rem auto;
		max-width: var(--content-narrow);
	}
}

@media (max-width: 1024px) {
	.container {
		padding: 0;
	}

	.nav-list {
		flex-wrap: wrap;
		gap: 1rem 2rem;
	}

	.main-title {
		font-size: 3.5rem;
	}

	.decoration-base,
	.header-decoration,
	.story-decoration,
	.content-decoration {
		max-width: 150px;
	}

	.line {
		width: 2.5rem;
	}
}

@media (max-width: 768px) {
	body {
		padding: 0.5rem;
	}

	.container {
		width: 100%;
		padding: 0;
	}

	.header-container {
		flex-direction: column;
		align-items: center;
		gap: 1rem;
		padding: 2rem 0;
	}

	.text-content {
		margin-left: 0;
	}

	.horn-svg {
		width: 100px;
		height: 125px;
		/* Consider adding: transform-origin: center; */
		/* Consider adding: transform: scale(0.9); */
	}

	.main-title {
		font-size: clamp(2rem, 8vw, 3rem);
	}

	.nav-list {
		gap: 0.75rem 1.5rem;
	}

	.text-section,
	.technical-section,
	.contributors-note,
	.warnings-section,
	.footer {
		padding: 0 1rem;
	}

	.line {
		width: 2rem;
	}

	.content-refrain {
		max-width: 18em;
	}

	.content-refrain::before,
	.content-refrain::after {
		width: 2rem;
	}

	.build-sequence {
		flex-direction: column;
		gap: 1rem;
		align-items: center;
		text-align: center;
	}

	.prev-step,
	.next-step {
		max-width: 100%;
		text-align: center;
	}

	.nav-link {
		padding: 8px 12px;
	}
}

@media (max-width: 374px) {
	.nav-link {
		font-size: 0.75rem;
	}

	.main-title {
		font-size: 1.75rem;
	}

	.ipa-notation {
		font-size: 1.25rem;
	}

	.line {
		width: 1.5rem;
	}
}

@media print {

	/* Core adjustments */
	body {
		margin: 0;
		padding: 0;
		color: black;
		background: white;
	}

	/* Hide non-essential elements */
	.nav-container,
	.build-sequence,
	.progress-bar {
		display: none;
	}

	/* Optimize technical diagrams */
	.drawing-container {
		break-inside: avoid;
		border: 1px solid #999;
		max-width: 100%;
		box-shadow: none;
	}

	/* Ensure measurements are readable */
	.drawing-notes {
		break-inside: avoid;
		background: none;
		border-top: 1px solid #ccc;
	}

	/* Page break controls */
	h2,
	.technical-section {
		break-before: always;
	}

	/* URLs for references */
	a[href]:after {
		content: " (" attr(href) ")";
		font-size: 90%;
	}
}