/*
Theme Name: Tenderplaybook
Theme URI: https://www.tenderplaybook.com/
Description: The public-procurement field guide skin for Tenderplaybook.com — the authority hub for winning public-sector tenders. GeneratePress child theme.
Author: Atdt AB
Template: generatepress
Version: 0.1.0
Text Domain: tenderplaybook
*/

/* ==========================================================================
   Design tokens — Field guide (pine green + cream + ochre)
   ========================================================================== */
:root {
	--pine-900: #15291d;
	--pine-800: #1a3325;
	--pine-700: #1F3D2B;   /* primary pine */
	--pine-600: #2a5238;
	--pine-500: #3a6b4b;

	--ink:      #20211C;
	--ink-soft: #41443a;

	--moss-600: #5d6452;
	--moss-500: #767c69;
	--moss-400: #9aa089;
	--moss-300: #c3c6b6;

	--ochre-700: #a96e2e;
	--ochre-600: #C2843B;   /* handbook-tab accent */
	--ochre-500: #d29a55;
	--ochre-100: #f1e2cb;

	--cream:       #F4EFE3;   /* paper / cream */
	--cream-soft:  #faf7ef;
	--surface:     #fffdf8;
	--line:        #e3dccb;
	--line-strong: #d3cab4;

	--accent: var(--ochre-600);

	--font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--font-body:    'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--maxw: 1140px;
	--r-sm: 6px;
	--r:    10px;
	--r-lg: 16px;
	--r-xl: 22px;

	--shadow-sm: 0 1px 2px rgba(31, 61, 43, .06), 0 1px 3px rgba(31, 61, 43, .05);
	--shadow:    0 16px 36px -18px rgba(31, 61, 43, .30);
	--shadow-lg: 0 36px 70px -28px rgba(21, 41, 29, .42);
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
	font-family: var(--font-body);
	color: var(--ink-soft);
	background: var(--surface);
	font-size: 1.0625rem;
	line-height: 1.66;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .tp-h1, .tp-h2 {
	font-family: var(--font-display);
	color: var(--ink);
	letter-spacing: -0.005em;
	line-height: 1.12;
	font-weight: 600;
}

a { color: var(--pine-700); text-decoration: none; }
a:hover { color: var(--ochre-700); }

.tp-wrap {
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: clamp(1.1rem, 4vw, 2.25rem);
}

/* Full-bleed bands inside GeneratePress' constrained content wrapper */
.tp-home .tp-sect,
.tp-guide .tp-sect {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}
body.home #content,
body.home .site-content,
body.home .site-main { padding: 0; margin: 0; }
body.home .site-main > * { margin: 0; }

/* ==========================================================================
   Header / nav (GeneratePress)
   ========================================================================== */
.site-header {
	background: rgba(255, 253, 248, .92);
	backdrop-filter: saturate(1.1) blur(8px);
	border-bottom: 1px solid var(--line);
}
.inside-header { align-items: center; }
.site-logo img, .header-image { height: 36px !important; width: auto; }
.site-branding { padding: 0; }
.main-title {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.01em;
}
.main-title a { color: var(--ink); }
.site-description { display: none; }

.main-navigation,
.main-navigation ul { background: transparent; }
.main-navigation .main-nav ul li a {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: .97rem;
	color: var(--moss-600);
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item a {
	color: var(--pine-700);
}

/* ==========================================================================
   Buttons / links / tags
   ========================================================================== */
.tp-btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1;
	padding: .92em 1.45em;
	border-radius: var(--r);
	border: 1px solid transparent;
	transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
	cursor: pointer;
}
.tp-btn--primary { background: var(--pine-700); color: var(--cream); box-shadow: 0 10px 22px -10px rgba(31, 61, 43, .55); }
.tp-btn--primary:hover { background: var(--pine-800); color: #fff; transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(31, 61, 43, .65); }
.tp-btn--ochre { background: var(--ochre-600); color: #fff; box-shadow: 0 10px 22px -10px rgba(194, 132, 59, .6); }
.tp-btn--ochre:hover { background: var(--ochre-700); color: #fff; transform: translateY(-1px); }
.tp-btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.tp-btn--ghost:hover { border-color: var(--moss-400); transform: translateY(-1px); color: var(--ink); }

.tp-link {
	font-family: var(--font-body);
	font-weight: 700;
	color: var(--pine-700);
	font-size: .97rem;
}
.tp-link:hover { color: var(--ochre-700); }

.tp-tag {
	display: inline-block;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ochre-700);
	background: var(--ochre-100);
	padding: .35em .7em;
	border-radius: var(--r-sm);
}

.tp-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--moss-500);
	margin: 0 0 1.1rem;
}
.tp-tab {
	display: inline-block;
	width: 18px; height: 12px;
	background: var(--ochre-600);
	border-radius: 0 0 3px 3px;
	box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}

.tp-microtrust { font-size: .9rem; color: var(--moss-400); margin-top: 1rem; }

/* ==========================================================================
   Section headings
   ========================================================================== */
.tp-sect { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.tp-sect__head { max-width: 46ch; margin-bottom: 2.6rem; }
.tp-sect__head--row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.tp-h1 { font-size: clamp(2.5rem, 5.6vw, 4rem); font-weight: 700; }
.tp-h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.tp-lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--moss-600); margin: 0 0 1.9rem; max-width: 40ch; }
.tp-sub { color: var(--moss-500); font-size: 1.1rem; margin: .6rem 0 0; }

/* ==========================================================================
   Hero — field guide with indexed contents card
   ========================================================================== */
.tp-hero {
	background:
		radial-gradient(110% 120% at 92% -20%, rgba(194, 132, 59, .12), transparent 55%),
		linear-gradient(180deg, var(--cream), var(--surface));
	border-bottom: 1px solid var(--line);
}
.tp-hero__grid {
	display: grid;
	grid-template-columns: 1.04fr .96fr;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}
.tp-cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Hero panel: a stacked "table of contents" / indexed chapters card */
.tp-index {
	position: relative;
	background: var(--pine-700);
	border-radius: var(--r-xl);
	padding: clamp(1.7rem, 3vw, 2.4rem);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}
.tp-index::before {
	content: "";
	position: absolute; inset: 0;
	background: radial-gradient(80% 60% at 88% 0%, rgba(194, 132, 59, .22), transparent 60%);
	pointer-events: none;
}
/* protruding handbook tabs along the right edge */
.tp-index__tabs {
	position: absolute; top: clamp(1.7rem, 3vw, 2.4rem); right: 0;
	display: grid; gap: .55rem;
}
.tp-index__tabs span {
	display: block; width: 12px; height: 34px;
	background: var(--ochre-600);
	border-radius: 4px 0 0 4px;
	opacity: .9;
}
.tp-index__tabs span:nth-child(2) { background: var(--ochre-500); height: 26px; }
.tp-index__tabs span:nth-child(3) { background: var(--moss-400); height: 22px; }

.tp-index__label {
	font-family: var(--font-display);
	font-weight: 600; font-style: italic;
	color: var(--ochre-500);
	font-size: .92rem;
	letter-spacing: .01em;
	margin: 0 0 1.2rem;
	position: relative;
}
.tp-toc { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: .1rem; }
.tp-toc li {
	display: grid; grid-template-columns: auto 1fr auto;
	align-items: baseline; gap: .8rem;
	padding: .72rem .2rem;
	border-bottom: 1px dashed rgba(244, 239, 227, .16);
}
.tp-toc li:last-child { border-bottom: none; }
.tp-toc__no {
	font-family: var(--font-display); font-weight: 600;
	font-size: .82rem; color: var(--ochre-500);
	font-variant-numeric: tabular-nums;
}
.tp-toc__ch {
	font-family: var(--font-body); font-weight: 600;
	font-size: 1rem; color: var(--cream);
}
.tp-toc__pg {
	font-family: var(--font-display); font-weight: 600;
	font-size: .85rem; color: var(--moss-300);
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Trust strip
   ========================================================================== */
.tp-trust { background: var(--pine-900); padding-block: 1.15rem; }
.tp-trust__row {
	display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; justify-content: center;
}
.tp-trust__row span {
	font-family: var(--font-body); font-weight: 600; font-size: .92rem;
	color: var(--moss-300); position: relative; padding-left: 1.3rem;
}
.tp-trust__row span::before {
	content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
	width: 7px; height: 7px; border-radius: 2px; background: var(--ochre-600);
}

/* ==========================================================================
   Grids / cards — content pillars
   ========================================================================== */
.tp-grid { display: grid; gap: 1.4rem; }
.tp-grid--4 { grid-template-columns: repeat(4, 1fr); }
.tp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tp-grid--2 { grid-template-columns: repeat(2, 1fr); }

.tp-pillars { background: var(--cream); border-block: 1px solid var(--line); }

/* Pillar card styled like a tabbed handbook chapter */
.tp-card {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 1.8rem 1.6rem 1.6rem;
	box-shadow: var(--shadow-sm);
	transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease;
}
.tp-card::before {
	content: "";
	position: absolute; top: 0; left: 1.6rem;
	width: 38px; height: 5px;
	background: var(--ochre-600);
	border-radius: 0 0 3px 3px;
}
.tp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.tp-card__no { font-family: var(--font-display); font-weight: 600; font-size: .82rem; color: var(--moss-400); letter-spacing: .08em; }
.tp-card h3 { font-size: 1.22rem; margin: .8rem 0 .55rem; }
.tp-card p { font-size: .98rem; margin: 0 0 1.1rem; color: var(--moss-600); }

/* Featured guides */
.tp-post {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 1.7rem;
	display: flex; flex-direction: column; gap: .7rem;
	transition: transform .18s ease, box-shadow .25s ease;
}
.tp-post:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tp-post h3 { font-size: 1.2rem; line-height: 1.22; }
.tp-post p { font-size: .98rem; color: var(--moss-600); margin: 0; flex: 1; }
.tp-meta { font-family: var(--font-body); font-weight: 600; font-size: .82rem; color: var(--moss-400); }

/* ==========================================================================
   How-it-works — numbered field-guide steps
   ========================================================================== */
.tp-steps { background: var(--cream-soft); border-block: 1px solid var(--line); }
.tp-steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(4, 1fr); counter-reset: tp-step; }
.tp-steps__list li {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 1.7rem 1.4rem 1.5rem;
}
.tp-steps__list li::before {
	counter-increment: tp-step;
	content: counter(tp-step, decimal-leading-zero);
	display: block;
	font-family: var(--font-display); font-weight: 700;
	font-size: 1.5rem; color: var(--ochre-600);
	margin-bottom: .6rem;
}
.tp-steps__list h3 { font-size: 1.08rem; margin: 0 0 .4rem; }
.tp-steps__list p { font-size: .95rem; color: var(--moss-600); margin: 0; }

/* ==========================================================================
   Audience band
   ========================================================================== */
.tp-audience { background: var(--pine-800); color: var(--cream); }
.tp-audience__inner { text-align: center; }
.tp-audience .tp-h2 { color: var(--cream); }
.tp-audience .tp-sub { color: var(--moss-300); }
.tp-audience__list {
	list-style: none; margin: 1.8rem 0 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center;
}
.tp-audience__list li {
	font-family: var(--font-body); font-weight: 600;
	padding: .6em 1.2em; border-radius: var(--r-sm);
	border: 1px solid rgba(194, 132, 59, .4);
	color: var(--cream);
}

/* ==========================================================================
   Final CTA
   ========================================================================== */
.tp-finalcta { background: linear-gradient(180deg, var(--surface), var(--cream)); }
.tp-finalcta__inner { text-align: center; max-width: 40rem; margin-inline: auto; }
.tp-signup { display: flex; gap: .6rem; justify-content: center; margin: 1.6rem auto 0; max-width: 28rem; }
.tp-signup input {
	flex: 1; padding: .9em 1.1em; font-size: 1rem; font-family: var(--font-body);
	border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface);
}
.tp-signup input:focus { outline: none; border-color: var(--ochre-500); box-shadow: 0 0 0 4px var(--ochre-100); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer, .site-info {
	background: var(--pine-900);
	color: var(--moss-300);
}
.site-info { font-family: var(--font-body); font-size: .9rem; }
.site-info a { color: var(--moss-300); }
.site-info a:hover { color: var(--ochre-500); }

/* ==========================================================================
   Articles (single post) + Guide prose
   ========================================================================== */
.tp-guide-hero {
	background: linear-gradient(180deg, var(--cream), var(--surface));
	border-bottom: 1px solid var(--line);
	padding-block: clamp(3rem, 7vw, 5rem);
}
.tp-lead--wide { max-width: 62ch; }

.single .entry-header { max-width: 44rem; margin: 0 auto clamp(1.4rem, 3vw, 2.2rem); padding-top: clamp(2rem, 5vw, 3.5rem); }
.single .entry-title { font-size: clamp(2rem, 4vw, 2.9rem); }
.single .entry-meta { font-family: var(--font-body); font-weight: 600; font-size: .88rem; color: var(--moss-400); margin-top: .7rem; }

/* Readable prose column for both single posts and guide pages */
.single .entry-content,
.tp-prose {
	max-width: 44rem;
	margin-inline: auto;
	font-size: 1.12rem;
	line-height: 1.78;
	color: var(--ink-soft);
}
.single .entry-content > *,
.tp-prose > * { margin-block: 0 1.35em; }
.single .entry-content h2,
.tp-prose h2 { font-size: 1.75rem; margin-top: 2.2em; }
.single .entry-content h3,
.tp-prose h3 { font-size: 1.32rem; margin-top: 1.8em; }
.single .entry-content a,
.tp-prose a { color: var(--pine-700); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; text-decoration-color: var(--ochre-500); }
.single .entry-content a:hover,
.tp-prose a:hover { color: var(--ochre-700); }
.single .entry-content blockquote,
.tp-prose blockquote {
	border-left: 3px solid var(--ochre-600);
	margin-inline: 0; padding: .4em 0 .4em 1.3em;
	font-family: var(--font-display); font-style: italic;
	font-size: 1.22rem; color: var(--ink);
}
.single .entry-content ul,
.single .entry-content ol,
.tp-prose ul, .tp-prose ol { padding-left: 1.3em; }
.single .entry-content li,
.tp-prose li { margin-bottom: .5em; }
.single .entry-content li::marker,
.tp-prose li::marker { color: var(--ochre-600); }
.single .entry-content img,
.tp-prose img { border-radius: var(--r); }
.single .entry-content code,
.tp-prose code { background: var(--cream); padding: .15em .4em; border-radius: 6px; font-size: .92em; }

/* Reference tables (built with the block editor inside guides) */
.tp-prose table,
.single .entry-content table { width: 100%; border-collapse: collapse; font-size: .98rem; margin-block: 1.6em; }
.tp-prose th, .tp-prose td,
.single .entry-content th, .single .entry-content td {
	border: 1px solid var(--line); padding: .7em .9em; text-align: left;
}
.tp-prose thead th,
.single .entry-content thead th {
	background: var(--cream); font-family: var(--font-display); font-weight: 600; color: var(--ink);
}
.tp-prose tbody tr:nth-child(even),
.single .entry-content tbody tr:nth-child(even) { background: var(--cream-soft); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
	.tp-hero__grid { grid-template-columns: 1fr; }
	.tp-index { order: 2; }
	.tp-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.tp-grid--3 { grid-template-columns: 1fr; }
	.tp-grid--2 { grid-template-columns: 1fr; }
	.tp-steps__list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
	.tp-grid--4 { grid-template-columns: 1fr; }
	.tp-steps__list { grid-template-columns: 1fr; }
	.tp-signup { flex-direction: column; }
	.tp-sect__head--row { flex-direction: column; align-items: start; }
}
