/* Nichols Software — site stylesheet */

:root {
	--ink: #16181d;
	--ink-soft: #3b404a;
	--muted: #666c78;
	--line: #e3e5ea;
	--bg: #ffffff;
	--bg-alt: #f5f6f8;
	--surface: #ffffff;
	--brand: #d61f33;
	--brand-dark: #b0182a;
	--brand-tint: #fdecee;
	--night: #121419;
	--night-2: #1c1f26;
	--night-line: #2d313b;
	--night-text: #c9ccd4;
	--amber: #ffc271;
	--amber-deep: #e19838;
	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(16, 18, 24, .05), 0 8px 24px rgba(16, 18, 24, .07);
	--max: 1160px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-display: "Space Grotesk", var(--font);
}

@media (prefers-color-scheme: dark) {
	:root {
		--ink: #eef0f4;
		--ink-soft: #c5c9d2;
		--muted: #9aa0ad;
		--line: #2a2e37;
		--bg: #0f1115;
		--bg-alt: #151820;
		--surface: #181b22;
		--brand: #ff4d5e;
		--brand-dark: #ff6b79;
		--brand-tint: #2a1519;
		--night: #0b0c10;
		--night-2: #14161c;
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
	}
}

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

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink-soft);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
	font-family: var(--font-display);
	color: var(--ink);
	line-height: 1.15;
	letter-spacing: -.02em;
	margin: 0 0 .5em;
	font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 100;
	background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
	display: inline-block;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--brand);
	margin-bottom: 14px;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 13px 22px;
	border-radius: 999px;
	border: 1px solid transparent;
	font: 600 1rem/1 var(--font);
	text-decoration: none;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-amber { background: var(--amber); color: #1a1a1a; }
.btn-amber:hover { background: #ffd08f; color: #1a1a1a; }
.btn-outline-light { border-color: var(--night-line); color: #fff; }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 1.1rem var(--font-display); letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; }

.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-alt); }
.site-nav .btn { margin-left: 8px; padding: 10px 18px; font-size: .95rem; color: #fff; }
.site-nav .btn:hover { background: var(--brand-dark); color: #fff; }

.nav-toggle {
	display: none;
	background: none; border: 1px solid var(--line); border-radius: 8px;
	width: 42px; height: 42px; padding: 0; cursor: pointer; color: var(--ink);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
	display: block; width: 18px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-nav {
		display: none;
		position: absolute; top: 68px; left: 0; right: 0;
		background: var(--bg); border-bottom: 1px solid var(--line);
		padding: 12px 24px 20px;
	}
	.nav-open .site-nav { display: block; }
	.site-nav ul { flex-direction: column; align-items: stretch; }
	.site-nav a { padding: 12px; }
	.site-nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* Hero */
.hero { padding: 88px 0 96px; position: relative; overflow: hidden; }
.hero::before {
	content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 14%, transparent), transparent);
	pointer-events: none;
}
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; position: relative; }
.hero h1 span { color: var(--brand); }
.hero .lead { margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 36px; font-size: .92rem; color: var(--muted); }
.hero-meta span::before { content: "✓"; color: var(--brand); font-weight: 700; margin-right: 8px; }

.code-card {
	background: var(--night); color: var(--night-text);
	border-radius: var(--radius); box-shadow: var(--shadow);
	border: 1px solid var(--night-line);
	font: .88rem/1.7 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	overflow: hidden;
}
.code-card .bar { display: flex; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--night-line); }
.code-card .bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3f4b; }
.code-card .bar i:first-child { background: #ff5f57; }
.code-card .bar i:nth-child(2) { background: #febc2e; }
.code-card .bar i:nth-child(3) { background: #28c840; }
.code-card pre { margin: 0; padding: 20px 22px 24px; white-space: pre-wrap; }
.code-card .k { color: #ff7b8a; }
.code-card .s { color: var(--amber); }
.code-card .c { color: #6f7685; }
.code-card .g { color: #6fdc8c; }

@media (max-width: 900px) {
	.hero { padding: 56px 0 72px; }
	.hero .container { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
	.code-card { display: none; }
}

/* StinkBugs band */
.stinkbugs { background: var(--night); color: var(--night-text); position: relative; overflow: hidden; }
.stinkbugs::after {
	content: ""; position: absolute; right: -200px; bottom: -260px; width: 640px; height: 640px;
	background: radial-gradient(closest-side, rgba(255, 194, 113, .16), transparent);
	pointer-events: none;
}
.stinkbugs h2, .stinkbugs h3 { color: #fff; }
.stinkbugs .eyebrow { color: var(--amber); }
.stinkbugs .lead { color: #a9adb8; }
.stinkbugs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; position: relative; z-index: 1; }
.product-mark { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.product-mark img { width: 56px; height: 56px; border-radius: 14px; }
.product-mark strong { font: 700 1.5rem var(--font-display); color: #fff; letter-spacing: -.01em; }
.product-mark small { display: block; color: #8d92a0; font-size: .85rem; font-weight: 500; }
.stinkbugs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feature-list li {
	background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--radius);
	padding: 18px 20px 18px 58px; position: relative;
}
.feature-list li::before {
	content: attr(data-n);
	position: absolute; left: 18px; top: 18px;
	width: 26px; height: 26px; border-radius: 8px;
	background: rgba(255, 194, 113, .14); color: var(--amber);
	font: 700 .8rem/26px var(--font); text-align: center;
}
.feature-list strong { color: #fff; display: block; font-weight: 600; margin-bottom: 2px; }
.feature-list span { font-size: .95rem; color: #a9adb8; }
@media (max-width: 900px) { .stinkbugs-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 28px; display: flex; flex-direction: column;
	text-decoration: none; color: inherit;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.card p { font-size: .98rem; color: var(--muted); }
.card .more { margin-top: auto; color: var(--brand); font-weight: 600; font-size: .95rem; }
.icon {
	width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
	background: var(--brand-tint); color: var(--brand); margin-bottom: 20px;
}
.icon svg { width: 24px; height: 24px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; border-top: 2px solid var(--line); padding-top: 22px; }
.steps li::before { content: "0" counter(step); display: block; font: 700 .85rem var(--font-display); color: var(--brand); letter-spacing: .1em; margin-bottom: 10px; }
.steps p { font-size: .98rem; color: var(--muted); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* About */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: start; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.stat strong { display: block; font: 700 2.2rem/1.1 var(--font-display); color: var(--ink); letter-spacing: -.02em; margin-bottom: 6px; }
.stat span { font-size: .92rem; color: var(--muted); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; }
.contact-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.contact-points li { display: flex; gap: 14px; align-items: flex-start; }
.contact-points .icon { margin: 0; flex: none; width: 40px; height: 40px; }
.contact-points .icon svg { width: 20px; height: 20px; }
.contact-points strong { display: block; color: var(--ink); }
.contact-points span { font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; color: var(--ink); font-size: .92rem; margin-bottom: 6px; }
.field input, .field textarea {
	width: 100%; padding: 12px 14px;
	font: inherit; font-size: 1rem; color: var(--ink);
	background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
	transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } .form { padding: 22px; } }
.form .btn { width: 100%; justify-content: center; }
.form-note { font-size: .85rem; color: var(--muted); margin: 14px 0 0; text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Page hero (inner pages) */
.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.page-hero .lead { margin: 0; }
.crumb { font-size: .9rem; margin-bottom: 18px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--brand); }

.prose { max-width: 720px; }
.prose h2 { font-size: 1.7rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.split { display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: start; }
.aside { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.aside h3 { font-size: 1.1rem; }
.aside p { font-size: .95rem; color: var(--muted); }
.aside ul { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--line); padding-top: 16px; }
.aside li a { display: block; padding: 6px 0; text-decoration: none; color: var(--ink-soft); font-size: .95rem; }
.aside li a:hover, .aside li a[aria-current="page"] { color: var(--brand); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .aside { position: static; } }

.check-list { list-style: none; padding: 0 !important; }
.check-list li { padding-left: 30px; position: relative; }
.check-list li::before {
	content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 18px; border-radius: 50%;
	background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23d61f33'%3E%3Cpath d='M8.2 13.6 4.6 10l-1.2 1.2 4.8 4.8 9-9-1.2-1.2z'/%3E%3C/svg%3E") center/13px no-repeat;
}

/* CTA band */
.cta-band { background: var(--night); color: var(--night-text); border-radius: 20px; padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta-band p { margin: 0; color: #a9adb8; }
@media (max-width: 560px) { .cta-band { padding: 36px 24px; } }

/* Status pages */
.status { text-align: center; padding: 120px 0; }
.status .badge {
	width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 28px; display: grid; place-items: center;
	background: var(--brand-tint); color: var(--brand);
}
.status .badge svg { width: 34px; height: 34px; }
.status .lead { margin: 0 auto 32px; }

/* Payment */
.pay-card { max-width: 520px; margin: 0 auto; }
.pay-card .field input[type="number"] { -moz-appearance: textfield; }
.field-error { color: var(--brand); font-size: .85rem; margin-top: 6px; display: none; }
.field.invalid .field-error { display: block; }
.field.invalid input { border-color: var(--brand); }
#paypal-button-container { margin-top: 8px; min-height: 50px; }
.pay-success { display: none; text-align: center; }
.paid .pay-success { display: block; }
.paid .pay-form { display: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font: 600 .8rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); }
.footer-grid p { color: var(--muted); max-width: 300px; margin-top: 14px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.btn, .card { transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }
