/*
Theme Name: Life OS
Theme URI: https://ayencreative.com
Author: Ayen Creative Agency
Description: The companion theme for the Life OS plugin. The plugin renders its own templates and does not need this theme; this theme exists so the screens the plugin does not own -- 404s, search, a stray page, the site root when the takeover is off -- look like the rest of the app instead of like a different website. It stands alone with its own palette if the plugin is ever deactivated.
Version: 0.2.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: life-os-theme
Tags: one-column, custom-colors, translation-ready
*/

/*
 * Tokens.
 *
 * These are fallbacks. When the plugin is active it emits the same custom
 * properties inline, carrying whatever colours the signed-in person chose, and
 * those win because they load after this file. Keep the two lists in step: the
 * source of truth is Lifeos_Theme::defaults().
 */

:root {
	--canvas:     #0E0E0F;
	--ink:        #1A1B1C;
	--card:       #FDFAF6;
	--card-pure:  #FFFFFF;
	--muted:      #6B6B70;
	--line:       #E8E2DA;

	--brand:      #EB0028;
	--brand-deep: #B00020;
	--brand-text: #C10021;
	--brand-lift: #FF5A6E;
	--brand-soft: #FDE6EA;
	--brand-dim:  #2A0B10;
	--on-brand:   #FFFFFF;

	--ok:         #4E9A6B;
	--warn:       #D9A441;
	--bad:        #A3161B;

	--font-ui:      "Vazirmatn", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	--font-display: "Fraunces", "Vazirmatn", Georgia, "Times New Roman", serif;
	--font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

body {
	margin: 0;
	background: var(--canvas);
	color: var(--card);
	font-family: var(--font-ui);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
}

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }

img { max-width: 100%; height: auto; }

a { color: var(--brand-lift); }

:focus-visible {
	outline: 2px solid var(--brand-lift);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.lost-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 16px;
	background: var(--brand);
	color: var(--on-brand);
}

.lost-skip:focus { left: 0; }

/* ---------- shell ------------------------------------------------------- */

.lost-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.lost-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 20px 20px 0;
	max-width: 760px;
	width: 100%;
	margin: 0 auto;
}

.lost-mark {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 500;
	color: var(--card);
	text-decoration: none;
}

.lost-mark__badge {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: var(--brand);
	color: var(--on-brand);
	font-size: 16px;
}

.lost-nav {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

.lost-nav a {
	padding: 7px 14px;
	border: 1px solid color-mix(in srgb, var(--card) 18%, transparent);
	border-radius: 999px;
	color: color-mix(in srgb, var(--card) 72%, transparent);
	text-decoration: none;
}

.lost-nav a:hover { border-color: var(--brand); color: var(--brand-lift); }

.lost-nav a.is-primary {
	background: var(--brand);
	border-color: var(--brand);
	color: var(--on-brand);
}

.lost-nav a.is-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--on-brand); }

.lost-main {
	flex: 1 1 auto;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: 32px 20px 56px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* ---------- cards and type ---------------------------------------------- */

.lost-card {
	background: var(--card);
	color: var(--ink);
	border-radius: 12px;
	padding: 28px 24px;
}

.lost-eyebrow {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.lost-display {
	font-family: var(--font-display);
	font-size: clamp(28px, 6vw, 40px);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin-top: 8px;
	text-wrap: balance;
}

.lost-lead {
	margin-top: 12px;
	font-size: 16px;
	color: var(--muted);
	max-width: 60ch;
}

.lost-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.lost-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--card-pure);
	color: var(--ink);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
}

.lost-btn:hover { border-color: var(--muted); }

.lost-btn--primary {
	background: var(--brand);
	border-color: var(--brand);
	color: var(--on-brand);
}

.lost-btn--primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

/* ---------- content ------------------------------------------------------ */

.lost-entry { color: var(--ink); }

.lost-entry h1,
.lost-entry h2,
.lost-entry h3 {
	font-family: var(--font-display);
	font-weight: 500;
	line-height: 1.2;
	margin-top: 28px;
	letter-spacing: -0.01em;
}

.lost-entry h1 { font-size: 30px; }
.lost-entry h2 { font-size: 24px; }
.lost-entry h3 { font-size: 19px; }

.lost-entry p,
.lost-entry ul,
.lost-entry ol,
.lost-entry blockquote,
.lost-entry figure,
.lost-entry table { margin-top: 16px; }

.lost-entry ul,
.lost-entry ol { padding-inline-start: 22px; }

.lost-entry li { margin-top: 6px; }

.lost-entry a { color: var(--brand-text); }

.lost-entry blockquote {
	padding-inline-start: 16px;
	border-inline-start: 3px solid var(--brand);
	color: var(--muted);
}

.lost-entry code,
.lost-entry pre {
	font-family: var(--font-mono);
	font-size: 14px;
	background: color-mix(in srgb, var(--ink) 6%, transparent);
	border-radius: 6px;
}

.lost-entry code { padding: 2px 5px; }

.lost-entry pre {
	padding: 14px 16px;
	overflow-x: auto;
}

.lost-entry pre code { background: none; padding: 0; }

.lost-entry table { width: 100%; border-collapse: collapse; }
.lost-entry th,
.lost-entry td {
	text-align: start;
	padding: 8px 10px;
	border-bottom: 1px solid var(--line);
}

.lost-entry img { border-radius: 10px; }

.lost-meta {
	margin-top: 10px;
	font-size: 13px;
	color: var(--muted);
}

/* ---------- lists -------------------------------------------------------- */

.lost-list { display: flex; flex-direction: column; gap: 12px; }

.lost-item {
	display: block;
	padding: 18px 20px;
	background: var(--card);
	color: var(--ink);
	border-radius: 12px;
	text-decoration: none;
}

.lost-item:hover { outline: 2px solid var(--brand); outline-offset: -2px; }

.lost-item h2 {
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 500;
}

/* ---------- search ------------------------------------------------------- */

.lost-search {
	display: flex;
	gap: 8px;
	margin-top: 18px;
}

.lost-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 11px 12px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--card-pure);
	color: var(--ink);
	font: inherit;
	font-size: 16px;
}

.lost-search input[type="search"]:focus {
	outline: 2px solid var(--brand);
	outline-offset: 1px;
	border-color: var(--brand);
}

/* ---------- pagination and footer ---------------------------------------- */

.lost-pagination {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 14px;
}

.lost-pagination .page-numbers {
	padding: 7px 13px;
	border: 1px solid color-mix(in srgb, var(--card) 18%, transparent);
	border-radius: 8px;
	color: color-mix(in srgb, var(--card) 72%, transparent);
	text-decoration: none;
}

.lost-pagination .page-numbers.current {
	background: var(--brand);
	border-color: var(--brand);
	color: var(--on-brand);
}

.lost-foot {
	padding: 0 20px 28px;
	text-align: center;
	font-size: 12px;
	color: color-mix(in srgb, var(--card) 42%, transparent);
}

.lost-foot__name { color: color-mix(in srgb, var(--card) 62%, transparent); }

@media print {
	body { background: #fff; color: #000; }
	.lost-head, .lost-nav, .lost-foot { display: none; }
	.lost-card { background: #fff; color: #000; border: 1px solid #ddd; }
}
