/* ============================================================
   Financial Freedom — Shared Professional Stylesheet
   ============================================================ */

:root {
	/* New professional palette */
	--navy: #0f2d3d;
	--teal: #0d7a5f;
	--teal-light: #e6f4f1;
	--accent: #4dd9b0;
	--text: #1c2b33;
	--text-muted: #5a7080;
	--bg: #f4f6f8;
	--surface: #ffffff;
	--border: #dde3e8;
	--radius: 12px;
	--shadow-sm: 0 2px 8px rgba(15, 45, 61, 0.08);
	--shadow-md: 0 8px 24px rgba(15, 45, 61, 0.12);

	/* Back-compat aliases used by page-specific styles */
	--deep-teal: #0d7a5f;
	--off-white: #ffffff;
	--lemon-yellow: #e6f4f1;
	--mint-green: #e6f4f1;
	--soft-peach: #fde8e0;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	font-size: 1rem;
}

/* ── Top navigation ── */
.top-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--navy);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-nav-inner {
	width: min(1100px, 92vw);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem;
	height: 56px;
	position: relative;
}

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 8px;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 180ms ease, border-color 180ms ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.3);
	outline: none;
}

.nav-toggle-bar {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 999px;
	background: currentColor;
	position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
	content: "";
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	border-radius: 999px;
	background: currentColor;
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.nav-links {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin-left: auto;
}

.nav-brand {
	font-weight: 800;
	font-size: 1rem;
	color: #ffffff;
	text-decoration: none;
	letter-spacing: -0.2px;
	margin-right: 1.2rem;
	white-space: nowrap;
	flex-shrink: 0;
}

.nav-brand span { color: var(--accent); }

.nav-btn {
	display: inline-block;
	text-decoration: none;
	padding: 0.36rem 0.85rem;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.855rem;
	color: rgba(255, 255, 255, 0.72);
	background: transparent;
	border: none;
	transition: background 180ms ease, color 180ms ease;
	white-space: nowrap;
}

.nav-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.nav-btn.active {
	background: rgba(77, 217, 176, 0.18);
	color: var(--accent);
}

/* ── Page layout ── */
.page {
	width: min(1100px, 92vw);
	margin: 0 auto;
	padding: 2.5rem 0 4rem;
}

h1, h2, h3 {
	font-family: "Plus Jakarta Sans", sans-serif;
	letter-spacing: -0.4px;
	margin: 0;
}

/* ── Hero ── */
.hero {
	background: linear-gradient(135deg, var(--navy) 0%, #174f68 100%);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: clamp(2rem, 5vw, 3.5rem);
	position: relative;
	overflow: hidden;
	color: #ffffff;
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

h1 {
	font-size: clamp(1.9rem, 4.5vw, 3.2rem);
	line-height: 1.15;
	position: relative;
	z-index: 1;
	color: #ffffff;
}

.hero-eyebrow {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 0.75rem;
	margin-top: 0;
	position: relative;
	z-index: 1;
}

.hero p {
	max-width: 58ch;
	font-size: 1.05rem;
	margin: 0.9rem 0 0;
	position: relative;
	z-index: 1;
	color: rgba(255, 255, 255, 0.82);
	line-height: 1.65;
}

/* ── Sections ── */
.section { margin-top: 2.5rem; }

.section-header {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 1.1rem;
}

.section h2,
.tool-section h2,
.section > h2 {
	font-size: clamp(1.4rem, 2.8vw, 1.9rem);
	color: var(--navy);
}

.section-tag {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--teal);
}

/* ── Cards grid ── */
.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.4rem 1.3rem;
	box-shadow: var(--shadow-sm);
	transition: box-shadow 220ms ease, transform 220ms ease;
	animation: riseIn 550ms ease both;
}

.card:nth-child(2) { animation-delay: 80ms; }
.card:nth-child(3) { animation-delay: 160ms; }
.card:nth-child(4) { animation-delay: 240ms; }

.card h3 {
	font-size: 1rem;
	color: var(--navy);
	margin: 0.45rem 0 0.4rem;
}

.card p {
	margin: 0;
	font-size: 0.9rem;
	color: var(--text-muted);
	line-height: 1.55;
}

/* ── Chip / badge ── */
.chip {
	display: inline-block;
	border-radius: 4px;
	background: var(--teal-light);
	color: var(--teal);
	padding: 0.22rem 0.6rem;
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	margin-bottom: 0.3rem;
}

/* ── Steps list ── */
.steps {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.steps li {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid var(--teal);
	border-radius: var(--radius);
	padding: 1rem 1.2rem;
	box-shadow: var(--shadow-sm);
}

.step-title {
	font-weight: 700;
	color: var(--navy);
}

/* ── Tool sections (page-specific containers) ── */
.tool-section {
	margin-top: 2rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.6rem;
	box-shadow: var(--shadow-sm);
}

/* Backwards-compat for old tool class names */
.tool, .safety-net, .unstuck, .traditional, .future {
	margin-top: 2rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.6rem;
	box-shadow: var(--shadow-sm);
}

.tool h2, .safety-net h2, .unstuck h2, .traditional h2, .future h2 {
	font-size: clamp(1.35rem, 3vw, 1.85rem);
	color: var(--navy);
}

.tool p, .safety-net p, .unstuck p, .traditional p, .future p {
	margin: 0.4rem 0 0;
	color: var(--text-muted);
}

/* Panels inside tools */
.panel {
	background: var(--bg);
	border-radius: 10px;
	border: 1px solid var(--border);
	padding: 1rem;
}

.panel h3 {
	font-size: 1.05rem;
	color: var(--navy);
}

/* Form controls */
input[type="number"],
input[type="text"],
select {
	width: 100%;
	padding: 0.52rem 0.62rem;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--surface);
	font: inherit;
	color: var(--text);
	font-size: 0.92rem;
	transition: border-color 180ms ease;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
	outline: none;
	border-color: var(--teal);
	box-shadow: 0 0 0 3px rgba(13, 122, 95, 0.12);
}

input[type="range"] {
	width: 100%;
	accent-color: var(--teal);
}

label {
	display: block;
	font-weight: 600;
	font-size: 0.88rem;
	margin-bottom: 0.35rem;
	color: var(--text);
}

/* ── Footer ── */
footer {
	margin-top: 3rem;
	border-top: 1px solid var(--border);
	padding: 1.5rem 0 0.5rem;
	text-align: center;
	font-size: 0.88rem;
	color: var(--text-muted);
}

/* ── Card external link ── */
.card-link {
	display: inline-block;
	margin-top: 0.65rem;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--teal);
	text-decoration: none;
}

.card-link:hover {
	text-decoration: underline;
}

/* ── Next-steps navigation bar ── */
.next-steps-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-top: 2.5rem;
	padding: 1.2rem 1.4rem;
	background: var(--teal-light);
	border: 1px solid var(--teal);
	border-radius: var(--radius);
}

.next-steps-bar p {
	margin: 0;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--navy);
}

.next-steps-bar a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: var(--teal);
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	padding: 0.55rem 1.2rem;
	font-weight: 700;
	font-size: 0.9rem;
	white-space: nowrap;
	transition: background 160ms, transform 160ms;
}

.next-steps-bar a:hover {
	background: #0b6b52;
	transform: translateY(-1px);
}

/* ── Animation ── */
@keyframes riseIn {
	from { transform: translateY(14px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 680px) {
	.page { width: min(1100px, 96vw); padding: 1.5rem 0 2.5rem; }
	.cards { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	.top-nav-inner {
		height: auto;
		padding: 0.45rem 0;
		gap: 0.5rem;
		flex-wrap: wrap;
	}

	.nav-brand {
		margin-right: auto;
		padding: 0.25rem 0;
	}

	.nav-toggle {
		display: inline-flex;
	}

	.nav-links {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0.2rem;
		padding: 0.3rem 0 0.15rem;
	}

	.top-nav[data-open="true"] .nav-links {
		display: flex;
	}

	.nav-btn {
		font-size: 0.84rem;
		padding: 0.65rem 0.8rem;
		border-radius: 8px;
	}
}

@media (max-width: 420px) {
	h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
}
