/*
Theme Name: JamboSurveys Theme
Theme URI: https://creatorz.co.ke
Author: Creatorz
Description: Lightweight, mobile-first theme for a paid-surveys and game-rewards site. Landing page, member dashboard, blog and ad slots. No page builders.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: jambosurveys
*/

:root {
	--green: #18a568;
	--green-d: #117a4d;
	--ink: #182026;
	--slate: #556270;
	--bg: #f5f7fa;
	--pill: #e8eef5;
	--line: #dde4ec;
	--white: #fff;
	--radius: 12px;
	--header-h: 64px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font: 400 1rem/1.6 var(--font); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
body.drawer-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-d); }
a:hover { color: var(--green); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--slate); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--white); padding: 10px 16px; border-radius: 8px; z-index: 100; }
:focus-visible { outline: 3px solid rgba(24,165,104,.55); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }
.wrap-article { max-width: 780px; }
.section { padding: 48px 0; }
.section-alt { background: var(--bg); }
.section-title { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.section-lead { color: var(--slate); margin-bottom: 28px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); }

/* Buttons & pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 2px solid transparent; border-radius: 10px; font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-d); color: var(--white); }
.btn-ghost { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green); color: var(--ink); }
.btn-google { background: var(--white); border-color: #cfd8e3; color: var(--ink); }
.btn-google:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn-block { width: 100%; }
.pill { display: inline-block; padding: 4px 12px; background: var(--pill); color: #31465b; border-radius: 999px; font-size: .8rem; font-weight: 600; text-decoration: none; }
a.pill:hover { background: #d9e3ee; color: #31465b; }
.pill-ok { background: #d7f1e4; color: #0d5c38; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: baseline; font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; color: var(--ink); }
.brand-surveys { color: var(--green); }
.brand-light { color: var(--white); }
.header-cta { margin-left: auto; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; }
.bars::after { top: 7px; }
.primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; box-shadow: 0 12px 24px rgba(24,32,38,.08); }
.primary-nav.is-open { display: block; }
.menu, .footer-menu { list-style: none; margin: 0; padding: 0; }
.primary-nav a { display: block; padding: 12px 0; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--bg); }
.primary-nav a:hover { color: var(--green-d); }

@media (min-width: 900px) {
	.nav-toggle { display: none; }
	.primary-nav { display: block; position: static; padding: 0; border: 0; box-shadow: none; margin-left: 32px; background: none; }
	.primary-nav .menu { display: flex; gap: 4px; }
	.primary-nav a { padding: 8px 14px; border: 0; border-radius: 999px; }
	.primary-nav a:hover { background: var(--bg); }
	.header-cta { margin-left: auto; }
}

/* Hero */
.hero { padding: 36px 0 56px; }
.hero-grid { display: grid; gap: 32px; align-items: start; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; }
.ticks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; font-size: 1.1rem; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); }
.ticks li::after { content: ""; position: absolute; left: 7px; top: 6px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 8px; align-items: center; font-weight: 700; }
.steps li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; background: var(--pill); border-radius: 999px; }
.steps li:not(:last-child)::after { content: "\2192" / ""; margin-left: 10px; color: var(--slate); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-size: .9rem; }
@media (min-width: 900px) {
	.hero { padding: 64px 0 80px; }
	.hero-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
}

/* Auth card */
.auth-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 12px 32px rgba(24,32,38,.09); }
.auth-title { font-size: 1.35rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--pill); border-radius: 999px; }
.auth-tab { min-height: 40px; border: 0; border-radius: 999px; background: none; font: 700 .95rem var(--font); color: var(--slate); cursor: pointer; }
.auth-tab[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(24,32,38,.15); }
.auth-form, .stack { display: grid; gap: 8px; }
.auth-form label, .stack label { font-weight: 600; font-size: .95rem; }
.auth-form[hidden] { display: none; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], select, textarea { width: 100%; min-height: 46px; padding: 10px 14px; font: 400 1rem var(--font); color: var(--ink); background: var(--white); border: 1.5px solid #cfd8e3; border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(24,165,104,.3); border-color: var(--green); }
.auth-form .btn, .stack .btn { margin-top: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--slate); font-size: .875rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-link { display: block; margin-top: 12px; text-align: center; font-size: .95rem; }
.fineprint { margin: 16px 0 0; font-size: .8rem; color: var(--slate); }
.hp { position: absolute; left: -9999px; }
.notice { padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: .95rem; }
.notice-error { background: #fdecec; color: #8a1f1f; }
.notice-success { background: #d7f1e4; color: #0d5c38; }

/* Cards & grids */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 1.15rem; margin-top: 10px; }
.card p:last-child { margin-bottom: 0; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.devices { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.devices h3 { margin-top: 0; }
.device-list { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.device-list .pill { font-size: .95rem; padding: 8px 18px; }

/* FAQ */
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { position: relative; padding: 18px 52px 18px 20px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: grid; place-items: center; background: var(--pill); border-radius: 50%; font-size: 1.1rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; background: var(--green); color: #fff; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--slate); }

/* Blog */
.post-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-card-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 20px; }
.post-card-title { margin: 12px 0 8px; font-size: 1.25rem; font-weight: 800; }
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-title a:hover { color: var(--green-d); }
.post-card-excerpt { color: var(--slate); }
.continue { margin-top: auto; font-weight: 700; text-decoration: none; }
.pagination { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-numbers { display: inline-block; padding: 8px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.page-numbers.current { background: var(--green); border-color: var(--green); color: #fff; }

.crumbs { font-size: .9rem; color: var(--slate); margin-bottom: 16px; }
.article-card { padding: 24px; }
.article-head h1 { margin-top: 12px; font-size: clamp(1.75rem, 4.5vw, 2.5rem); font-weight: 800; }
.article-img { margin: 0 -24px 24px; }
.entry-content { font-size: 1.05rem; line-height: 1.75; }
.entry-content h2 { margin-top: 1.8em; font-size: 1.5rem; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content img { border-radius: 10px; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--line); text-align: left; }
.cta-band { margin: 24px 0; padding: 28px; text-align: center; background: var(--ink); color: #fff; border-radius: var(--radius); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cdd6df; }
.post-navigation .nav-links { justify-content: space-between; margin-bottom: 24px; }
.comments { margin-top: 24px; }
.comment-list { padding-left: 20px; }
.ad-slot { max-width: 1120px; margin: 16px auto; padding: 0 20px; text-align: center; overflow: hidden; }

/* Footer */
.site-footer { background: var(--ink); color: #cdd6df; padding: 40px 0 24px; }
.footer-inner { display: grid; gap: 24px; }
.footer-note { max-width: 520px; font-size: .9rem; margin-top: 12px; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: #fff; }
.copyright { margin-top: 24px; padding-top: 16px; border-top: 1px solid #2c3842; font-size: .85rem; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 1fr auto; } }

/* Dashboard */
.dash { display: block; background: var(--bg); min-height: calc(100vh - var(--header-h)); }
.dash-sidebar { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); padding: 20px 16px; background: var(--white); overflow-y: auto; transform: translateX(-100%); transition: transform .2s ease; }
.dash-sidebar.is-open { transform: none; }
.dash-overlay { position: fixed; z-index: 60; inset: 0; background: rgba(24,32,38,.45); }
.dash-overlay[hidden] { display: none; }
.dash-user { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--pill); font-weight: 800; }
.dash-user-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-close { margin-left: auto; width: 40px; height: 40px; border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--slate); }
.dash-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dash-nav a { display: block; padding: 12px 16px; border-radius: 999px; color: var(--ink); font-weight: 600; text-decoration: none; }
.dash-nav a:hover { background: var(--bg); }
.dash-nav a.is-active { background: var(--green); color: #fff; }
.dash-logout { display: block; margin-top: 24px; padding: 0 16px; color: var(--slate); font-weight: 600; }
.dash-main { padding: 20px 16px 48px; max-width: 980px; margin: 0 auto; }
.dash-topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dash-topbar h1 { margin: 0; font-size: 1.4rem; }
.balance-bar { display: grid; gap: 12px; margin-bottom: 20px; }
.stat { display: grid; gap: 4px; padding: 18px 20px; }
.stat-label { font-size: .85rem; font-weight: 600; color: var(--slate); }
.stat-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.progress { height: 12px; margin: 6px 0; background: var(--pill); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.empty { text-align: center; padding: 40px 24px; }
.empty .btn { margin-top: 8px; }
.form-card { max-width: 520px; }
.offer-grid { display: grid; gap: 16px; margin-bottom: 20px; }
@media (min-width: 640px) { .offer-grid { grid-template-columns: repeat(2, 1fr); } .balance-bar { grid-template-columns: repeat(3, 1fr); } }
.streak { list-style: none; margin: 16px 0 0; padding: 0; display: flex; gap: 8px; }
.streak li { width: 36px; height: 36px; border-radius: 50%; background: var(--pill); }
.streak li.is-done { background: var(--green); }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 480px; }
.table th, .table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-size: .85rem; color: var(--slate); }

@media (min-width: 960px) {
	.dash { display: grid; grid-template-columns: 270px 1fr; align-items: start; }
	.dash-sidebar { position: sticky; top: var(--header-h); z-index: 1; height: calc(100vh - var(--header-h)); width: auto; transform: none; border-right: 1px solid var(--line); }
	.drawer-close, .dash-topbar .btn, .dash-overlay { display: none !important; }
	.dash-main { width: 100%; padding: 32px 32px 64px; margin: 0; max-width: none; }
	.dash-main > * { max-width: 920px; }
	.dash-topbar h1 { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
