/* Lloyd Communications license/store site. No framework, no build step -
   one plain stylesheet shared by the homepage, auth pages, dashboard and
   admin panel. */

:root {
	--ink: #1c1c1a;
	--muted: #6f6d66;
	--border: #e6e3dc;
	--surface: #ffffff;
	--surface-raised: #ffffff;
	--bg: #faf9f6;
	--accent: #0f766e;
	--accent-dark: #0b5d56;
	--accent-soft: #e3f2f0;
	--good: #15803d;
	--bad: #b3261e;
	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(28, 28, 26, 0.04), 0 8px 24px -12px rgba(28, 28, 26, 0.12);
}

@media (prefers-color-scheme: dark) {
	:root {
		--ink: #eeece6;
		--muted: #9b988f;
		--border: #322f28;
		--surface: #201e1a;
		--surface-raised: #262420;
		--bg: #171613;
		--accent: #2dd4bf;
		--accent-dark: #5eead4;
		--accent-soft: #16302c;
		--good: #4ade80;
		--bad: #f87171;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
	}
}

* {
	box-sizing: border-box;
}

html {
	color-scheme: light dark;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	position: relative;
}

body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 999;
	pointer-events: none;
	opacity: 0.025;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
	color: var(--accent-dark);
}

@media (prefers-color-scheme: dark) {
	a {
		color: var(--accent);
	}
}

h1, h2, h3 {
	letter-spacing: -0.02em;
	font-weight: 700;
}

.wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---- Header ---- */

.site-header {
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 20;
	backdrop-filter: saturate(180%) blur(8px);
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	min-height: 64px;
}

.brand {
	font-weight: 800;
	font-size: 17px;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -0.01em;
	display: flex;
	align-items: center;
	gap: 9px;
}

.brand-mark {
	flex-shrink: 0;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 22px;
	font-size: 14px;
}

.site-nav a {
	color: var(--ink);
	text-decoration: none;
}

.site-nav a:not(.button-link):hover {
	color: var(--accent-dark);
}

@media (prefers-color-scheme: dark) {
	.site-nav a:not(.button-link):hover {
		color: var(--accent);
	}
}

/* ---- Buttons ---- */

.button-link,
.button {
	display: inline-block;
	padding: 11px 20px;
	border-radius: var(--radius-sm);
	background: var(--accent);
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	font-size: 14.5px;
	border: none;
	cursor: pointer;
	transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease;
}

.button-link:hover,
.button:hover {
	background: var(--accent-dark);
	color: #ffffff;
}

.button:active,
.button-link:active {
	transform: scale(0.98);
}

.button.secondary {
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--border);
}

.button.secondary:hover {
	background: var(--surface-raised);
	color: var(--ink);
	border-color: var(--muted);
}

.button.danger {
	background: var(--bad);
}

.button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

@media (prefers-color-scheme: dark) {
	.button-link,
	.button {
		color: #0c1210;
	}

	.button-link:hover,
	.button:hover {
		color: #0c1210;
	}
}

/* ---- Plugin page ---- */

.plugin-family {
	padding: 12px 0;
	background: var(--bg);
}

.plugin-family.alt {
	background: var(--surface);
}

.plugin-family + .plugin-family {
	border-top: 1px solid var(--border);
}

.plugin-block {
	padding: 64px 0;
}

.plugin-block + .plugin-block {
	border-top: 1px solid var(--border);
}

.tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-dark);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 16px;
}

@media (prefers-color-scheme: dark) {
	.tag {
		color: var(--accent);
	}
}

.plugin-block h1 {
	font-size: clamp(30px, 3.6vw, 42px);
	line-height: 1.1;
	margin: 0 0 14px;
}

.plugin-block h2.plugin-title {
	font-size: clamp(26px, 3vw, 34px);
	line-height: 1.15;
	margin: 0 0 14px;
}

.plugin-description {
	color: var(--muted);
	font-size: 16.5px;
	max-width: 58ch;
	margin: 0 0 28px;
}

.requires-note {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 13px;
	color: var(--muted);
	text-decoration: none;
	margin-bottom: 18px;
}

.requires-note:hover {
	border-color: var(--muted);
	color: var(--ink);
}

.requires-note svg {
	color: var(--accent-dark);
	flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
	.requires-note svg {
		color: var(--accent);
	}
}

/* hero screenshot (real front-end grid capture) */
.hero-shot {
	position: relative;
	isolation: isolate;
	margin: 4px 0 32px;
}

.hero-shot::before {
	content: "";
	position: absolute;
	inset: -14%;
	z-index: -1;
	background:
		radial-gradient(circle at 18% 20%, oklch(78% 0.12 175 / 45%), transparent 55%),
		radial-gradient(circle at 85% 80%, oklch(70% 0.1 200 / 35%), transparent 60%);
	filter: blur(48px);
	pointer-events: none;
}

.hero-shot img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	cursor: zoom-in;
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-shot img:hover {
	transform: translateY(-3px);
}

/* flow diagram (free -> pro) */
.flow-diagram {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 4px 0 32px;
}

.flow-chip {
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
	font-weight: 600;
	font-size: 14px;
}

.flow-chip.accent {
	background: var(--accent-soft);
	border-color: transparent;
	color: var(--accent-dark);
}

@media (prefers-color-scheme: dark) {
	.flow-chip.accent {
		color: var(--accent);
	}
}

.flow-plus {
	color: var(--muted);
	font-size: 18px;
	font-weight: 600;
}

/* trust icon row */
.trust-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 32px;
}

.trust-row span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 13px;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 12.5px;
	color: var(--muted);
}

/* screenshot cards */
.screenshot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	gap: 24px;
	margin: 0 0 32px;
	align-items: start;
}

.shot-frame {
	position: relative;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface);
	box-shadow: var(--shadow);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.shot-frame:hover {
	transform: translateY(-3px);
	box-shadow: 0 1px 2px rgba(28, 28, 26, 0.04), 0 16px 32px -12px rgba(28, 28, 26, 0.22);
}

.shot-frame img {
	display: block;
	width: 100%;
	height: auto;
	cursor: zoom-in;
}

.shot-frame::after {
	content: "";
	position: absolute;
	top: 12px;
	right: 12px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: color-mix(in oklab, var(--ink) 55%, transparent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 15px;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.shot-frame:hover::after {
	opacity: 1;
}

.shot-caption {
	margin: 10px 0 0;
	font-size: 12.5px;
	color: var(--muted);
}

/* lightbox */
.lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px;
	background: rgba(10, 10, 8, 0.88);
	backdrop-filter: blur(6px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.lightbox-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-overlay img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 12px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
	transform: scale(0.97);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-overlay.is-open img {
	transform: scale(1);
}

.lightbox-close {
	position: absolute;
	top: 20px;
	right: 24px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.22);
}

@media (prefers-reduced-motion: reduce) {
	.lightbox-overlay,
	.lightbox-overlay img,
	.shot-frame {
		transition: none;
	}
}

@media (max-width: 640px) {
	.lightbox-overlay {
		padding: 20px;
	}
}

.screenshot-placeholder {
	aspect-ratio: 16 / 10;
	border: 1.5px dashed var(--border);
	border-radius: var(--radius);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: var(--muted);
	padding: 20px;
	text-align: center;
	background: var(--surface);
}

.screenshot-placeholder svg {
	color: var(--muted);
}

.screenshot-placeholder span {
	font-size: 12.5px;
	max-width: 32ch;
}

.plugin-note {
	font-size: 13.5px;
	color: var(--muted);
	max-width: 60ch;
	margin: 0 0 28px;
}

.plugin-points {
	list-style: none;
	margin: 0 0 30px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 11px;
}

.plugin-points li {
	display: flex;
	align-items: baseline;
	gap: 11px;
	font-size: 14.5px;
	color: var(--ink);
}

.plugin-points li::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
	flex-shrink: 0;
}

.plugin-buy {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding-top: 24px;
	border-top: 1px solid var(--border);
	max-width: 620px;
}

.plugin-buy.no-price {
	justify-content: flex-start;
}

.plugin-price {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.plugin-price .amount {
	font-size: clamp(30px, 3vw, 38px);
	font-weight: 800;
	line-height: 1.1;
}

.plugin-price .amount .cents {
	font-size: 0.5em;
	font-weight: 700;
	color: var(--muted);
}

.plugin-price .unit {
	font-size: 13px;
	font-weight: 500;
	color: var(--muted);
}

/* ---- Comparison table ---- */

.compare {
	padding: 20px 0 100px;
}

.compare h2 {
	font-size: 26px;
	margin: 0 0 28px;
}

.table-scroll {
	overflow-x: auto;
	border-radius: var(--radius);
	border: 1px solid var(--border);
}

.compare-table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	background: var(--surface);
}

.compare-table th,
.compare-table td {
	padding: 14px 16px;
	text-align: left;
	border-bottom: 1px solid var(--border);
	font-size: 14px;
}

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
	text-align: center;
}

.compare-table th {
	background: var(--bg);
	font-weight: 700;
}

.compare-table tr:last-child td {
	border-bottom: none;
}

.compare-table .yes {
	color: var(--good);
}

.compare-table .no {
	color: var(--muted);
	opacity: 0.5;
}

/* scroll reveal */
[data-reveal] {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	[data-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ---- Forms ---- */

.form-page {
	max-width: 420px;
	margin: 64px auto;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 36px;
}

.form-page h1 {
	font-size: 22px;
	margin: 0 0 24px;
}

.field {
	margin-bottom: 18px;
}

.field label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 15px;
	font-family: inherit;
	background: var(--surface);
	color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}

.field .description {
	font-size: 12.5px;
	color: var(--muted);
	margin-top: 4px;
}

.form-actions {
	margin-top: 24px;
}

.form-footer-link {
	margin-top: 18px;
	font-size: 14px;
	text-align: center;
	color: var(--muted);
}

.method-choice {
	display: flex;
	gap: 12px;
	margin-bottom: 20px;
}

.method-choice label {
	flex: 1;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 14px;
	text-align: center;
	cursor: pointer;
	font-size: 14px;
}

.method-choice input {
	margin-right: 6px;
}

.totp-secret {
	font-family: "SFMono-Regular", Consolas, monospace;
	background: var(--bg);
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	letter-spacing: 0.05em;
	word-break: break-all;
	font-size: 14px;
}

/* ---- Notices ---- */

.notice {
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	margin-bottom: 20px;
	font-size: 14px;
}

.notice-success {
	background: var(--accent-soft);
	color: var(--good);
	border: 1px solid var(--border);
}

.notice-error {
	background: #fef2f2;
	color: var(--bad);
	border: 1px solid #fecaca;
}

@media (prefers-color-scheme: dark) {
	.notice-error {
		background: #2a1616;
		border-color: #4a2323;
	}
}

.notice-info {
	background: var(--accent-soft);
	color: var(--accent-dark);
	border: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
	.notice-info {
		color: var(--accent);
	}
}

/* ---- Dashboard / admin ---- */

.page-wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 40px 24px 80px;
}

.page-wrap h1 {
	font-size: 25px;
	margin-bottom: 24px;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	margin-bottom: 20px;
}

.card h2 {
	margin: 0 0 4px;
	font-size: 17px;
}

.license-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	color: var(--muted);
	font-size: 13.5px;
	margin: 12px 0 16px;
}

.license-key {
	font-family: "SFMono-Regular", Consolas, monospace;
	background: var(--bg);
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	font-size: 13.5px;
}

.badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.badge.active {
	background: var(--accent-soft);
	color: var(--good);
}

.badge.expired,
.badge.cancelled,
.badge.refunded {
	background: #fef2f2;
	color: var(--bad);
}

@media (prefers-color-scheme: dark) {
	.badge.expired,
	.badge.cancelled,
	.badge.refunded {
		background: #2a1616;
	}
}

.badge.pending {
	background: #fffbeb;
	color: #92400e;
}

@media (prefers-color-scheme: dark) {
	.badge.pending {
		background: #2e2410;
		color: #fbbf24;
	}
}

.card-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

table.data-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

table.data-table th,
table.data-table td {
	padding: 10px 14px;
	text-align: left;
	border-bottom: 1px solid var(--border);
	font-size: 13.5px;
}

table.data-table th {
	background: var(--bg);
	font-weight: 600;
	color: var(--muted);
}

table.data-table tr:last-child td {
	border-bottom: none;
}

.stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}

.stat-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 18px;
}

.stat-card .num {
	font-size: 28px;
	font-weight: 800;
}

.stat-card .label {
	color: var(--muted);
	font-size: 13px;
}

.admin-nav {
	display: flex;
	gap: 16px;
	margin-bottom: 24px;
	font-size: 14px;
	flex-wrap: wrap;
}

.admin-nav a {
	color: var(--ink);
	text-decoration: none;
	padding: 6px 0;
	border-bottom: 2px solid transparent;
}

.admin-nav a.current {
	color: var(--accent-dark);
	border-bottom-color: var(--accent-dark);
}

@media (prefers-color-scheme: dark) {
	.admin-nav a.current {
		color: var(--accent);
		border-bottom-color: var(--accent);
	}
}

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

.site-footer {
	padding: 32px 0;
	color: var(--muted);
	font-size: 13px;
	text-align: center;
	border-top: 1px solid var(--border);
}
