/*
Theme Name: Talpha
Theme URI: https://talpha.in
Author: Talpha
Description: A ledger-inspired theme for talpha.in, built to match the Talpha Screener plugin — homepage, company (stock) pages, and the screener listing, in a warm-paper / ink-navy / gold-accent identity with serif headings and tabular monospaced figures.
Version: 0.1.0
Requires PHP: 7.4
Text Domain: talpha
*/

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
	--ink: #10202F;
	--ink-soft: #223244;
	--paper: #F6F3EC;
	--paper-raised: #FFFFFF;
	--line: #DCD5C4;
	--gold: #B8862E;
	--gold-deep: #8F6A22;
	--green: #1E6E4F;
	--brick: #A8402F;
	--muted: #6B6252;

	--serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--sans);
	background: var(--paper);
	color: var(--ink);
	line-height: 1.55;
}

a { color: inherit; }

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

.wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 28px;
}

h1, h2, h3, h4 {
	font-family: var(--serif);
	color: var(--ink);
	line-height: 1.2;
	margin: 0 0 0.5em;
}

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}

/* ------------------------------- Site header ------------------------------- */

.site-header {
	background: var(--ink);
	color: var(--paper);
	border-bottom: 3px solid var(--gold);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 0;
}

.site-seal {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--paper);
}

.site-seal__mark {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 2px solid var(--gold);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--serif);
	font-weight: 700;
	font-size: 16px;
	color: var(--gold);
	flex-shrink: 0;
}

.site-seal__text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.site-seal__name {
	font-family: var(--serif);
	font-size: 21px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.site-seal__tagline {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #C9BFA8;
}

.site-nav ul {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
}

.site-nav a {
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	color: #E7E1D2;
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
}

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

.site-header__search {
	flex: 1;
	max-width: 340px;
	margin: 0 24px;
}

.site-header__search .talpha-search__input {
	background: rgba(255,255,255,0.06);
	border-color: rgba(255,255,255,0.25);
	color: var(--paper);
}

.site-header__search .talpha-search__input::placeholder {
	color: #B9AF97;
}

.site-header__search .talpha-search__results {
	background: var(--paper-raised);
}

.nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--gold);
	color: var(--paper);
	padding: 6px 10px;
	font-size: 13px;
	cursor: pointer;
}

/* --------------------------------- Hero ---------------------------------- */

.hero {
	border-bottom: 1px solid var(--line);
	padding: 64px 0 48px;
}

.hero__eyebrow {
	font-family: var(--mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--gold-deep);
	margin-bottom: 14px;
}

.hero h1 {
	font-size: 42px;
	max-width: 16ch;
}

.hero p.hero__lede {
	font-size: 17px;
	color: var(--ink-soft);
	max-width: 56ch;
	margin: 16px 0 28px;
}

.hero__actions {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

.btn {
	font-family: var(--sans);
	font-size: 14px;
	font-weight: 600;
	padding: 12px 22px;
	border: 1px solid var(--ink);
	background: transparent;
	color: var(--ink);
	text-decoration: none;
	display: inline-block;
	cursor: pointer;
}

.btn:hover { background: var(--ink); color: var(--paper); }

.btn--primary {
	background: var(--gold);
	border-color: var(--gold-deep);
	color: #fff;
}

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

/* ------------------------------- Stat strip -------------------------------- */

.stat-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border: 1px solid var(--line);
	background: var(--paper-raised);
	margin: 40px 0;
}

.stat-strip__item {
	padding: 20px 22px;
	border-right: 1px solid var(--line);
}

.stat-strip__item:last-child { border-right: none; }

.stat-strip__value {
	font-family: var(--mono);
	font-size: 26px;
	font-weight: 600;
	color: var(--ink);
}

.stat-strip__label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
	margin-top: 4px;
}

/* -------------------------------- Sections -------------------------------- */

.section {
	padding: 48px 0;
}

.section--muted { background: #EFEADB; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 24px;
	border-bottom: 2px solid var(--ink);
	padding-bottom: 10px;
}

.section__head h2 { font-size: 24px; margin: 0; }

.section__head a {
	font-family: var(--mono);
	font-size: 12.5px;
	text-decoration: none;
	color: var(--gold-deep);
}

.section__head a:hover { text-decoration: underline; }

.sector-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1px;
	background: var(--line);
	border: 1px solid var(--line);
}

.sector-card {
	background: var(--paper-raised);
	padding: 18px 20px;
	text-decoration: none;
	color: var(--ink);
}

.sector-card:hover { background: #FFFDF7; }

.sector-card__name {
	font-family: var(--serif);
	font-size: 16px;
	font-weight: 600;
}

.sector-card__count {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--muted);
	margin-top: 4px;
}

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

.site-footer {
	background: var(--ink);
	color: #B9AF97;
	padding: 36px 0;
	margin-top: 40px;
	font-size: 13px;
}

.site-footer a { color: #E7E1D2; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

.site-footer__row {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

/* ---------------------------- Company single page --------------------------- */

.company-header {
	padding: 40px 0 0;
}

.company-header__eyebrow {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.company-header h1 {
	font-size: 32px;
	margin: 8px 0 0;
}

.company-content {
	max-width: 74ch;
	font-size: 15.5px;
	color: var(--ink-soft);
	padding: 8px 0 48px;
}

.company-content p { margin: 0 0 1.2em; }

/* ---------------------------------- Page ------------------------------------ */

.page-content {
	padding: 48px 0;
	max-width: 74ch;
	font-size: 15.5px;
	color: var(--ink-soft);
}

/* --------------------------------- Mobile ------------------------------------ */

@media (max-width: 780px) {
	.nav-toggle { display: inline-block; }
	.site-header__search { display: none; }
	.site-nav { display: none; width: 100%; }
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; gap: 14px; padding: 18px 0 6px; }
	.site-header__inner { flex-wrap: wrap; }
	.hero h1 { font-size: 30px; }
	.stat-strip { grid-template-columns: repeat(2, 1fr); }
	.stat-strip__item:nth-child(2) { border-right: none; }
}

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