/* joeprogrammer.com: one stylesheet for the whole site, light and dark */

:root {
	--bg: #f7f8fb;
	--surface: #ffffff;
	--surface-2: #eef1f7;
	--text: #1b2230;
	--muted: #556070;
	--line: #d9dee8;
	--brand: #2f6fb3;          /* JoeProgrammer blue (the J) */
	--brand-2: #a87a55;        /* JoeProgrammer tan (the P) */
	--blik: #446fa7;           /* Blik blue */
	--blik-2: #7c44a7;         /* Blik purple */
	--link: #2a63a8;
	--hero-text: #ffffff;
	--shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 6px 20px rgb(16 24 40 / 8%);
	--radius: 16px;
	--max: 1120px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f131a;
		--surface: #171c25;
		--surface-2: #1e2531;
		--text: #e6e9ef;
		--muted: #a2acbb;
		--line: #2c3442;
		--brand: #7db4ec;
		--brand-2: #d2a985;
		--link: #8ebcf0;
		--shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
		color-scheme: dark;
	}
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }
/* Let grid columns shrink below their content (wide screenshots), so phones don't scroll sideways */
.grid > *, .feature > *, .hero-grid > * { min-width: 0; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 0.6em; }
h3 { font-size: 1.2rem; margin: 0 0 0.4em; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 20px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 5;
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand small { font-weight: 500; color: var(--muted); font-size: 0.85em; }
.brand-blik img { border-radius: 9px; }
.site-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 6px 2px; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); }
.site-nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--brand); }
.section-blik .site-nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--blik); }

/* Hero bands */
.hero {
	color: var(--hero-text);
	background: linear-gradient(135deg, #1f3b66 0%, var(--brand) 55%, #3f86c9 100%);
	padding: clamp(48px, 9vw, 96px) 0;
}
.section-blik .hero { background: linear-gradient(135deg, var(--blik) 0%, #5b5aa8 55%, var(--blik-2) 100%); }
.hero p { font-size: 1.2rem; max-width: 40em; opacity: 0.95; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; opacity: 0.85; margin: 0 0 12px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero-art { justify-self: center; }
.hero-art img { filter: drop-shadow(0 18px 30px rgb(0 0 0 / 30%)); border-radius: 22px; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 22px; border-radius: 999px;
	font-weight: 700; text-decoration: none;
	background: #ffffff; color: #1f3b66;
	border: 2px solid #ffffff;
}
.button:hover { filter: brightness(0.95); }
.button.ghost { background: transparent; color: #ffffff; }
.section-blik .button { color: #3c3f8f; }
.section-blik .button.ghost { color: #ffffff; }
.button.solid { background: var(--brand); color: #ffffff; border-color: var(--brand); }
.section-blik .button.solid { background: var(--blik); border-color: var(--blik); color: #ffffff; }

/* Page sections */
.band { padding: clamp(48px, 7vw, 80px) 0; }
.band.alt { background: var(--surface-2); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46em; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.five { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* Widget screenshots carry their own transparent rounded corners, so shadows have to follow the image's shape */
img.widget { border-radius: 0 !important; box-shadow: none !important; }
.feature-art img.widget { filter: drop-shadow(0 6px 14px rgb(16 24 40 / 16%)); }
.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--muted); }
.card .icon {
	width: 44px; height: 44px; border-radius: 12px;
	display: grid; place-items: center;
	background: color-mix(in srgb, var(--brand) 14%, transparent);
	color: var(--brand); font-size: 22px; margin-bottom: 14px;
}
.section-blik .card .icon { background: color-mix(in srgb, var(--blik) 16%, transparent); color: var(--blik); }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature + .feature { margin-top: 64px; }
.feature.flip .feature-art { order: -1; }
.feature-art { justify-self: center; }
.feature-art img { border-radius: 18px; box-shadow: var(--shadow); }
.phone { max-width: 300px; border: 8px solid #1b2230; border-radius: 34px !important; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; gap: 24px; } .feature.flip .feature-art { order: 0; } }

.checks { list-style: none; padding: 0; margin: 16px 0 0; }
.checks li { position: relative; padding-left: 30px; margin: 8px 0; }
.checks li::before {
	content: ""; position: absolute; left: 4px; top: 0.45em;
	width: 14px; height: 8px; border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand);
	transform: rotate(-45deg);
}
.section-blik .checks li::before { border-color: var(--blik); }

.logos { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center; margin-top: 28px; color: var(--muted); font-weight: 700; font-size: 1.1rem; }

.example { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; font-size: 1.05rem; }
.example .event { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-family: ui-monospace, Consolas, monospace; }
.example .arrow { color: var(--muted); font-size: 1.4rem; }

.pricing { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 24px; }
.pricing .card h3 { display: flex; justify-content: space-between; }
.tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blik-2); }

.contact { text-align: center; }
.contact .button.solid { margin-top: 8px; }

/* Long-form pages: FAQ, tips, policies, release notes, resume */
.page-head { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 44px 0 32px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-head p { color: var(--muted); margin: 0; max-width: 44em; }
.prose { max-width: 760px; padding-block: 36px 64px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; }
.prose li { margin: 6px 0; }
.prose ol li::marker { font-weight: 700; color: var(--muted); }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }

.note {
	border-left: 4px solid var(--brand);
	background: var(--surface);
	border-radius: 0 12px 12px 0;
	padding: 14px 18px;
	margin: 20px 0;
	box-shadow: var(--shadow);
}
.section-blik .note { border-left-color: var(--blik); }
.note.warn { border-left-color: #c47a16; }

details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 12px 0; }
details > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style-position: outside; }
details > div { padding: 0 18px 14px; }

.toc { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.toc a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.toc a span { display: block; font-weight: 400; color: var(--muted); font-size: 0.92rem; }

.release { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.release h2 { margin-bottom: 0.2em; }
.release .date { color: var(--muted); font-size: 0.95rem; margin: 0 0 8px; }

/* Resume */
.resume-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline > li { position: relative; padding: 0 0 26px 24px; }
.timeline > li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.timeline .when { color: var(--muted); font-size: 0.95rem; }
.timeline h3 { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.92rem; margin: 0; }
mark.fill { background: color-mix(in srgb, #c47a16 22%, transparent); color: inherit; padding: 0 4px; border-radius: 4px; }
.todo { border: 2px dashed #c47a16; border-radius: 12px; padding: 12px 16px; background: color-mix(in srgb, #c47a16 8%, transparent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 20px; color: var(--muted); font-size: 0.95rem; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row p { margin: 6px 0 0; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: start; }
.footer-row nav a { color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; text-decoration: none; }
.copyright { margin-top: 24px; font-size: 0.85rem; }

@media (max-width: 560px) {
	body { font-size: 16px; }
	.header-row { padding-block: 8px; }
	.site-nav { gap: 2px 14px; }
}
