/**
 * Origo Family — Design System (Phase 2)
 *
 * Central CSS custom-property system + base component classes shared
 * by every shortcode template and the app shell. Loaded ONLY on pages
 * that actually render an Origo Family shortcode (see
 * Origo_Family_Public::maybe_enqueue_front_assets()), so it never adds
 * weight to unrelated Astra/Elementor pages.
 *
 * Namespacing: every class is prefixed `.of-` (Origo Family) to avoid
 * clashing with Astra/Elementor/theme classes.
 */

:root{
	/* Brand */
	--of-emerald: #087A5B;
	--of-emerald-dark: #075B45;
	--of-gold: #D4AF37;
	--of-gold-light: #F4E7B5;

	/* Surfaces */
	--of-bg: #F7F9F8;
	--of-card: #FFFFFF;

	/* Text */
	--of-text: #15231F;
	--of-text-secondary: #66736E;

	/* Status */
	--of-success: #16845B;
	--of-warning: #D99A18;
	--of-danger: #D64545;

	/* Structure */
	--of-border: #E5EBE8;

	/* Radius */
	--of-radius-lg: 20px;
	--of-radius-md: 16px;
	--of-radius-btn: 14px;
	--of-radius-input: 12px;

	/* Shadow */
	--of-shadow: 0 8px 30px rgba(20, 60, 45, 0.08);
	--of-shadow-sm: 0 2px 10px rgba(20, 60, 45, 0.06);

	/* Type */
	--of-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	/* Layout */
	--of-container: 1200px;
	--of-gap: 24px;
}

/* -------------------------------------------------------------
   Reset scoped to Origo Family components only (never touches
   the rest of the theme).
------------------------------------------------------------- */
.of-root, .of-root *{
	box-sizing: border-box;
}
.of-root{
	font-family: var(--of-font);
	color: var(--of-text);
	background: var(--of-bg);
	-webkit-font-smoothing: antialiased;
	line-height: 1.55;
}
.of-root img{ max-width: 100%; display: block; }
.of-root a{ color: inherit; text-decoration: none; }

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

.of-section{
	padding: 64px 0;
}
@media (max-width: 767px){
	.of-section{ padding: 40px 0; }
}

/* -------------------------------------------------------------
   Typography
------------------------------------------------------------- */
.of-hero-title{
	font-size: 48px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 16px;
}
.of-h1{ font-size: 40px; font-weight: 700; margin: 0 0 16px; line-height: 1.2; }
.of-h2{ font-size: 32px; font-weight: 700; margin: 0 0 16px; line-height: 1.25; }
.of-h3{ font-size: 22px; font-weight: 600; margin: 0 0 8px; line-height: 1.3; }

.of-legal-content{ margin-top: 24px; }
.of-legal-content p{ line-height: 1.7; margin: 0 0 16px; color: var(--of-text); }
.of-legal-content h2.of-h3{ margin-top: 32px; }
.of-body{ font-size: 16px; color: var(--of-text); }
.of-small{ font-size: 13px; color: var(--of-text-secondary); }
.of-lede{ font-size: 18px; color: var(--of-text-secondary); }
.of-eyebrow{
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--of-emerald);
	margin-bottom: 12px;
}
.of-center{ text-align: center; }

@media (max-width: 1199px){
	.of-hero-title{ font-size: 36px; }
	.of-h1{ font-size: 34px; }
	.of-h2{ font-size: 28px; }
}
@media (max-width: 767px){
	.of-hero-title{ font-size: 32px; }
	.of-h1{ font-size: 28px; }
	.of-h2{ font-size: 26px; }
}

/* -------------------------------------------------------------
   Buttons — hover / focus / active / disabled states, 44px min
   touch target.
------------------------------------------------------------- */
.of-btn{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 24px;
	border-radius: var(--of-radius-btn);
	font-size: 15px;
	font-weight: 600;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
	line-height: 1;
	white-space: nowrap;
}
.of-btn:active{ transform: translateY(1px); }
.of-btn:focus-visible{
	outline: 3px solid var(--of-gold-light);
	outline-offset: 2px;
}
.of-btn[disabled], .of-btn.is-disabled{
	opacity: .5;
	cursor: not-allowed;
	pointer-events: none;
}

.of-btn-primary{
	background: var(--of-emerald);
	color: #fff;
	box-shadow: var(--of-shadow-sm);
}
.of-btn-primary:hover{ background: var(--of-emerald-dark); }

.of-btn-secondary{
	background: #fff;
	color: var(--of-emerald);
	border-color: var(--of-emerald);
}
.of-btn-secondary:hover{ background: rgba(8,122,91,0.06); }

.of-btn-gold{
	background: var(--of-gold);
	color: #2B2408;
}
.of-btn-gold:hover{ background: #c19f2f; }

.of-btn-ghost{
	background: transparent;
	color: var(--of-text);
	border-color: var(--of-border);
}
.of-btn-ghost:hover{ background: var(--of-card); }

.of-btn-install{
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #4A0404, #7A0C0C) !important;
	color: #fff !important;
	border: none !important;
	box-shadow: 0 4px 16px rgba(0,0,0,0.28);
}
.of-btn-install:hover{ background: linear-gradient(135deg, #380303, #650A0A) !important; }
.of-btn-install::after{
	content: '';
	position: absolute;
	top: 0; left: -75%;
	width: 50%; height: 100%;
	background: linear-gradient(115deg, transparent, rgba(255,255,255,0.35), transparent);
	transform: skewX(-20deg);
	animation: of-btn-install-shine 3.2s ease-in-out infinite;
}
@keyframes of-btn-install-shine{
	0%   { left: -75%; }
	40%  { left: 125%; }
	100% { left: 125%; }
}
@media (prefers-reduced-motion: reduce){
	.of-btn-install::after{ animation: none; display: none; }
}

.of-btn-block{ width: 100%; }
.of-btn-sm{ min-height: 38px; padding: 0 16px; font-size: 14px; }

/* -------------------------------------------------------------
   Cards
------------------------------------------------------------- */
.of-card{
	background: var(--of-card);
	border: 1px solid var(--of-border);
	border-radius: var(--of-radius-md);
	box-shadow: var(--of-shadow-sm);
	padding: 24px;
}
.of-card-lg{ border-radius: var(--of-radius-lg); padding: 32px; }
.of-card-hover{ transition: transform .18s ease, box-shadow .18s ease; }
.of-card-hover:hover{ transform: translateY(-4px); box-shadow: var(--of-shadow); }

.of-grid{
	display: grid;
	gap: var(--of-gap);
}
.of-grid-2{ grid-template-columns: repeat(2, 1fr); }
.of-grid-3{ grid-template-columns: repeat(3, 1fr); }
.of-grid-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1199px){
	.of-grid-4{ grid-template-columns: repeat(2, 1fr); }
	.of-grid-3{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px){
	.of-grid-2, .of-grid-3, .of-grid-4{ grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------
   Inputs
------------------------------------------------------------- */
.of-input{
	width: 100%;
	min-height: 44px;
	padding: 0 14px;
	border-radius: var(--of-radius-input);
	border: 1.5px solid var(--of-border);
	background: #fff;
	font-family: var(--of-font);
	font-size: 15px;
	color: var(--of-text);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.of-input:focus-visible, .of-input:focus{
	outline: none;
	border-color: var(--of-emerald);
	box-shadow: 0 0 0 3px rgba(8,122,91,0.15);
}
.of-label{ display:block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }

/* -------------------------------------------------------------
   Badges / pills
------------------------------------------------------------- */
.of-badge{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 999px;
}
.of-badge-success{ background: rgba(22,132,91,.12); color: var(--of-success); }
.of-badge-warning{ background: rgba(217,154,24,.14); color: var(--of-warning); }
.of-badge-danger{ background: rgba(214,69,69,.12); color: var(--of-danger); }
.of-badge-gold{ background: var(--of-gold-light); color: #6b551a; }
.of-badge-demo{ background: #EFEAF9; color: #5A3FB0; }

/* -------------------------------------------------------------
   Icons — simple inline SVG wrapper, consistent sizing.
------------------------------------------------------------- */
.of-icon{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(8,122,91,0.08);
	color: var(--of-emerald);
	flex: 0 0 auto;
}
.of-icon svg{ width: 22px; height: 22px; }

/* -------------------------------------------------------------
   Empty / loading / error / success state components
   (used standalone and inside app-shell screens)
------------------------------------------------------------- */
.of-state{
	text-align: center;
	padding: 48px 24px;
	border-radius: var(--of-radius-md);
	border: 1px dashed var(--of-border);
	color: var(--of-text-secondary);
}
.of-state .of-icon{ margin: 0 auto 16px; }
.of-state-title{ font-weight: 600; color: var(--of-text); margin-bottom: 4px; }
.of-state-error{ border-color: rgba(214,69,69,.35); background: rgba(214,69,69,.04); }
.of-state-success{ border-style: solid; border-color: rgba(22,132,91,.3); background: rgba(22,132,91,.05); }
.of-spinner{
	width: 28px; height: 28px;
	border-radius: 50%;
	border: 3px solid var(--of-border);
	border-top-color: var(--of-emerald);
	animation: of-spin 0.8s linear infinite;
	margin: 0 auto 16px;
}
@keyframes of-spin{ to{ transform: rotate(360deg); } }

/* -------------------------------------------------------------
   Motion — subtle, and respectful of reduced-motion preference.
------------------------------------------------------------- */
.of-fade-in{
	animation: of-fade-in .5s ease both;
}
@keyframes of-fade-in{
	from{ opacity: 0; transform: translateY(8px); }
	to{ opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce){
	.of-root *{
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* Visually-hidden but accessible to screen readers. */
.of-sr-only{
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}

/* -------------------------------------------------------------
   Blank app-canvas template (public/templates/canvas.php).
   Removes default WordPress/Astra body chrome so the page reads as
   a standalone application rather than a themed blog page.
------------------------------------------------------------- */
body.origo-family-canvas{
	margin: 0;
	background: var(--of-bg);
}
.of-skip-link{
	position: absolute;
	left: -999px;
	top: auto;
	width: 1px; height: 1px;
	overflow: hidden;
	z-index: 10000;
	background: var(--of-emerald-dark);
	color: #fff;
	padding: 12px 20px;
	border-radius: 0 0 10px 0;
	font-weight: 600;
	font-family: var(--of-font);
}
.of-skip-link:focus{
	left: 0;
	top: 0;
	width: auto; height: auto;
	outline: 3px solid var(--of-gold-light);
	outline-offset: -3px;
}
