/* investment_advisory/public/css/site.css
   Shared marketing-site stylesheet - loaded on every www/* page via
   hooks.py's web_include_css. Deliberately separate from the React
   /portal app's own theme (frontend/src/index.css) - the marketing site
   and the product UI are allowed to look different; see the redesign
   plan for why. */

:root {
	--navy: #0f172a;
	--navy-soft: #1e293b;
	--gold: #c9a227;
	--gold-hover: #b08e1f;
	--bg-canvas: #faf9f7;
	--bg-surface: #ffffff;
	--border: #e5e2dc;
	--text-primary: #171923;
	--text-secondary: #5b6472;
	--text-muted: #8a8f98;
	--radius: 12px;
	--serif: Georgia, "Times New Roman", serif;
	--sans: -apple-system, "DM Sans", system-ui, sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	height: 100%;
}

body {
	margin: 0;
	min-height: 100%;
	display: flex;
	flex-direction: column;
	font-family: var(--sans);
	background: var(--bg-canvas);
	color: var(--text-primary);
	line-height: 1.6;
}

a {
	color: inherit;
}

.wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

h1, h2, h3 {
	font-family: var(--serif);
	letter-spacing: -0.01em;
}

/* ─── Site header ──────────────────────────────────────────────────────── */

.site-header {
	border-bottom: 1px solid var(--border);
	background: var(--bg-surface);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 68px;
	gap: 1.5rem;
}

.site-header .brand {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	text-decoration: none;
	flex-shrink: 0;
}

.site-header .brand img {
	width: 30px;
	height: 30px;
}

.site-header .brand span {
	font-family: var(--serif);
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--navy);
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	flex: 1;
	justify-content: center;
}

.site-nav a {
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-secondary);
}

.site-nav a:hover {
	color: var(--navy);
}

.site-header .actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
}

.site-header .actions a.login-link {
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-secondary);
}

@media (max-width: 760px) {
	.site-nav {
		display: none;
	}

	/* .brand and .actions are both flex-shrink: 0 above - fine on desktop
	   where .site-nav's flex: 1 absorbs the slack, but with nav hidden here
	   those two neither shrink nor wrap, so their combined natural width
	   (wordmark + "Log in"/"My Account" + the "View Plans" button) becomes a
	   hard floor on the header row - wider than a 320-375px phone, forcing
	   the whole page to scroll horizontally. Let both actually shrink
	   (brand's wordmark truncates as the last resort instead of overflowing)
	   and tighten the spacing/button sizing that was eating the width. */
	.site-header .wrap {
		gap: 0.75rem;
		padding: 0 1rem;
	}

	.site-header .brand {
		flex-shrink: 1;
		min-width: 0;
	}

	.site-header .brand span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.site-header .actions {
		gap: 0.625rem;
	}

	.site-header .actions .btn {
		padding: 0 1rem;
		font-size: 0.825rem;
	}
}

/* ─── Buttons ──────────────────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	padding: 0 1.5rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	transition: background-color 150ms, transform 150ms;
	border: none;
	cursor: pointer;
}

.btn-primary {
	background: var(--gold);
	color: var(--navy);
}

.btn-primary:hover {
	background: var(--gold-hover);
}

.btn-secondary {
	background: transparent;
	color: var(--bg-surface);
	border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.08);
}

.btn-outline-navy {
	background: transparent;
	color: var(--navy);
	border: 1px solid var(--border);
}

.btn-outline-navy:hover {
	background: var(--bg-canvas);
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */

.hero {
	background: var(--navy);
	color: #f4f2ec;
	padding: 4rem 0 3.5rem;
}

.hero .wrap {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 3rem;
	align-items: center;
}

.hero-eyebrow {
	color: var(--gold);
	font-weight: 700;
	font-size: 0.813rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 0.75rem;
}

.hero h1 {
	font-size: clamp(1.85rem, 3.6vw, 2.85rem);
	font-weight: 700;
	margin: 0 0 1rem;
	line-height: 1.15;
}

.hero p.subhead {
	font-size: 1.05rem;
	color: #cbd3df;
	max-width: 480px;
	margin: 0 0 1.75rem;
}

.hero .cta-row {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/* Growth-trajectory card (hero visual) */
.growth-card {
	background: var(--bg-surface);
	border-radius: var(--radius);
	padding: 1.5rem 1.5rem 1.25rem;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.growth-card-label {
	font-size: 0.75rem;
	color: var(--text-muted);
	font-weight: 600;
	margin-bottom: 0.75rem;
}

.growth-chart {
	display: block;
	width: 100%;
	height: auto;
}

.growth-card-footer {
	display: flex;
	gap: 2rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border);
}

.growth-stat {
	font-family: var(--serif);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--navy);
}

.growth-stat-label {
	font-size: 0.75rem;
	color: var(--text-secondary);
	margin-top: 0.125rem;
}

@media (max-width: 860px) {
	.hero .wrap {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.hero p.subhead {
		margin-left: auto;
		margin-right: auto;
	}
	.hero .cta-row {
		justify-content: center;
	}
	.growth-card {
		margin-top: 2rem;
	}
}

/* ─── Stat band ────────────────────────────────────────────────────────── */

.stat-band {
	background: var(--navy-soft);
	color: #f4f2ec;
	padding: 2.25rem 0;
}

.stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
	text-align: center;
}

.stat-number {
	font-family: var(--serif);
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 700;
	color: var(--gold);
	line-height: 1.1;
}

.stat-label {
	font-size: 0.85rem;
	color: #cbd3df;
	margin-top: 0.375rem;
}

/* ─── Trust strip ──────────────────────────────────────────────────────── */

.trust-strip {
	background: var(--bg-surface);
	border-bottom: 1px solid var(--border);
	padding: 1.5rem 0;
}

.trust-strip .wrap {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.trust-strip .card {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1.125rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 0.85rem;
	color: var(--text-secondary);
	background: var(--bg-canvas);
}

.trust-strip .dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--gold);
	flex-shrink: 0;
}

/* ─── Generic sections ─────────────────────────────────────────────────── */

section.page-section {
	padding: 3.5rem 0;
}

section.page-section.alt {
	background: var(--bg-surface);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.section-eyebrow {
	text-align: center;
	color: var(--gold-hover);
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

h2.section-title {
	text-align: center;
	font-size: 1.6rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: var(--navy);
}

p.section-lead {
	text-align: center;
	color: var(--text-secondary);
	max-width: 560px;
	margin: 0 auto 2.25rem;
}

/* ─── Principles / value cards ──────────────────────────────────────────── */

.principles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.25rem;
	max-width: 980px;
	margin: 0 auto;
}

.principle-card {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.5rem;
}

.principle-card .icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--navy);
	color: var(--gold);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--serif);
	font-weight: 700;
	margin-bottom: 0.875rem;
}

.principle-card h3 {
	font-size: 1.05rem;
	margin: 0 0 0.375rem;
	color: var(--navy);
}

.principle-card p {
	color: var(--text-secondary);
	font-size: 0.9rem;
	margin: 0;
}

/* ─── How it works ──────────────────────────────────────────────────────── */

.steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
	max-width: 900px;
	margin: 0 auto;
}

.step {
	text-align: center;
}

.step .num {
	width: 40px;
	height: 40px;
	margin: 0 auto 0.75rem;
	border-radius: 999px;
	background: var(--navy);
	color: var(--gold);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.1rem;
	font-family: var(--serif);
}

.step h3 {
	font-size: 1.05rem;
	margin: 0 0 0.375rem;
	color: var(--navy);
}

.step p {
	color: var(--text-secondary);
	font-size: 0.9rem;
	margin: 0;
}

/* ─── Plan / program cards ──────────────────────────────────────────────── */

.plans-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 1.25rem;
	max-width: 1000px;
	margin: 0 auto;
}

.plan-card {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.25rem;
	text-decoration: none;
	color: inherit;
	display: block;
	transition: box-shadow 150ms, transform 150ms;
}

.plan-card:hover {
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
	transform: translateY(-2px);
}

.plan-card .risk {
	display: inline-block;
	font-size: 0.688rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 2px 8px;
	border-radius: 10px;
	background: #fdf6e3;
	color: var(--gold-hover);
	margin-bottom: 0.5rem;
}

.plan-card h3 {
	margin: 0 0 0.375rem;
	font-size: 1.05rem;
	color: var(--navy);
}

.plan-card .returns {
	font-weight: 700;
	font-size: 1.4rem;
	margin: 0 0 0.375rem;
	font-family: var(--serif);
	color: var(--gold-hover);
}

.plan-card .meta {
	color: var(--text-secondary);
	font-size: 0.813rem;
}

/* ─── Story teaser / CTA banner ─────────────────────────────────────────── */

.story-teaser {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
}

.story-teaser p {
	color: var(--text-secondary);
	font-size: 1rem;
}

.final-cta {
	background: var(--navy);
	color: #f4f2ec;
	text-align: center;
	padding: 3.5rem 0;
}

.final-cta h2 {
	font-size: 1.6rem;
	margin: 0 0 1.25rem;
}

/* ─── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
	margin-top: auto;
	background: var(--navy);
	color: #aab2c0;
	padding: 3rem 0 1.5rem;
	font-size: 0.875rem;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 2rem;
	margin-bottom: 2rem;
}

.footer-grid .brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.footer-grid .brand img {
	width: 26px;
	height: 26px;
}

.footer-grid .brand span {
	font-family: var(--serif);
	font-weight: 700;
	color: #f4f2ec;
}

.footer-grid h4 {
	color: #f4f2ec;
	font-size: 0.813rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 0.875rem;
}

.footer-grid ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.footer-grid a {
	text-decoration: none;
	color: #aab2c0;
}

.footer-grid a:hover {
	color: #f4f2ec;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 1.25rem;
	text-align: center;
	color: #7d869b;
	font-size: 0.8rem;
}

@media (max-width: 700px) {
	.footer-grid {
		grid-template-columns: 1fr;
	}
}

/* ─── Simple content pages (About/FAQ/Contact/Legal) ───────────────────── */

.page-hero {
	background: var(--navy);
	color: #f4f2ec;
	padding: 3rem 0;
	text-align: center;
}

.page-hero h1 {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	margin: 0 0 0.5rem;
}

.page-hero p {
	color: #cbd3df;
	max-width: 560px;
	margin: 0 auto;
}

.content-wrap {
	max-width: 760px;
	margin: 0 auto;
	padding: 3rem 1.5rem;
}

.content-wrap h2 {
	color: var(--navy);
	font-size: 1.3rem;
	margin: 2.25rem 0 0.75rem;
}

.content-wrap h2:first-child {
	margin-top: 0;
}

.content-wrap p, .content-wrap li {
	color: var(--text-secondary);
	font-size: 0.95rem;
}

.faq-item {
	border-bottom: 1px solid var(--border);
	padding: 1.25rem 0;
}

.faq-item h3 {
	font-family: var(--sans);
	font-size: 1rem;
	color: var(--navy);
	margin: 0 0 0.5rem;
}

.faq-item p {
	margin: 0;
}

.advisor-card {
	display: flex;
	gap: 1.25rem;
	align-items: center;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.5rem;
	margin-top: 1.5rem;
}

.advisor-avatar {
	width: 64px;
	height: 64px;
	border-radius: 999px;
	background: var(--navy);
	color: var(--gold);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--serif);
	font-weight: 700;
	font-size: 1.3rem;
	flex-shrink: 0;
}

.advisor-card h3 {
	margin: 0 0 0.25rem;
	color: var(--navy);
	font-size: 1.05rem;
}

.advisor-card p {
	margin: 0;
	font-size: 0.875rem;
}

.contact-card {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.5rem;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.contact-card .icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: #fdf6e3;
	color: var(--gold-hover);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	flex-shrink: 0;
}

.pwa-install-banner {
	position: fixed;
	left: 1rem;
	right: 1rem;
	bottom: 1rem;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.875rem 1rem;
	background: var(--navy);
	color: #fff;
	border-radius: var(--radius);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
	font-size: 0.875rem;
}

.pwa-install-banner span {
	flex: 1;
}

.pwa-install-banner-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

.pwa-install-banner-dismiss {
	background: none;
	border: none;
	color: #aab2c0;
	font-size: 0.875rem;
	cursor: pointer;
	padding: 0.25rem;
	line-height: 1;
}

.pwa-install-banner-dismiss:hover {
	color: #fff;
}

@media (min-width: 640px) {
	.pwa-install-banner {
		left: auto;
		right: 1.5rem;
		bottom: 1.5rem;
		max-width: 360px;
	}
}
