/*
Theme Name: POPIA Ready Portal
Theme URI: https://terroirbookings.com
Author: Terroirsbookings
Author URI: https://terroirbookings.com
Description: The client dashboard shell for POPIA Ready. Deliberately minimal — no blog, no comments, no sidebar. Everything a client does happens inside the [popia_portal] shortcode; this theme exists to frame it and get out of the way.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: popia-portal
Tags: business, minimal
*/

@import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:wght@400;500;600;700&family=Source+Sans+3:wght@400;600;700&display=swap');

/* =====================================================================
   TOKENS — the marketing site's palette, so a client moving from
   terroirbookings.com to the portal does not feel handed off to a
   different company.
   ================================================================== */

:root {
	--brand:      #2E2470;
	--brand-deep: #1B1547;
	--brand-soft: #5A4FBF;
	--brand-wash: #F0EEFB;

	--go:         #0F8A5F;
	--accent:     #DE8C0A;
	--risk:       #B3261E;

	--ink:        #111722;
	--ink-2:      #333F4F;
	--muted:      #5A6675;
	--faint:      #8A95A3;

	--ground:     #F4F6FA;
	--card:       #FFFFFF;
	--line:       #E2E7EE;

	--font-display: 'Familjen Grotesk', 'Segoe UI', system-ui, sans-serif;
	--font-sans:    'Source Sans 3', system-ui, -apple-system, sans-serif;

	--radius: 8px;
}

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

/*
 * An inline SVG carrying only a viewBox has no intrinsic size, so the
 * reset below (height: auto) lets it grow to its container's width. On a
 * full-width header that turns a 19px icon into a 1900px one the instant
 * anything delays or overrides the sizing rule. Icons are pinned here, and
 * carry width/height attributes in the markup as well, so the failure
 * cannot happen at all rather than being merely unlikely.
 */
svg:not([width]):not([height]) { max-width: 100%; }
.portal-brand svg { width: 19px; height: 19px; flex: none; }

body {
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--ground);
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

a { color: inherit; }
img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--brand);
	color: #fff;
	padding: 12px 20px;
	z-index: 999;
}
.skip-link:focus { left: 0; }

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

/* =====================================================================
   HEADER
   ================================================================== */

.portal-header {
	background: var(--card);
	border-bottom: 1px solid var(--line);
}

.portal-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 68px;
}

.portal-brand {
	display: flex;
	align-items: center;
	gap: 11px;
	text-decoration: none;
}

.portal-brand__mark {
	width: 34px; height: 34px;
	border-radius: 8px;
	background: var(--brand);
	color: #fff;
	display: grid;
	place-items: center;
	flex: none;
}
.portal-brand__mark svg { width: 19px; height: 19px; }

.portal-brand__name {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -.02em;
	line-height: 1.1;
	display: block;
}

.portal-brand__tag {
	display: block;
	font-size: 11.5px;
	color: var(--faint);
	margin-top: 1px;
}

.portal-nav {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14.5px;
}

.portal-nav a {
	padding: 8px 12px;
	border-radius: 6px;
	text-decoration: none;
	color: var(--ink-2);
	font-weight: 600;
	transition: background .15s ease, color .15s ease;
}

.portal-nav a:hover { background: var(--ground); color: var(--brand); }

.portal-nav .is-user {
	color: var(--faint);
	font-weight: 400;
	padding: 8px 4px;
}

@media (max-width: 560px) {
	.portal-header__inner { flex-direction: column; align-items: flex-start; padding: 14px 0; }
	.portal-brand__tag { display: none; }
}

/* =====================================================================
   MAIN
   ================================================================== */

.portal-main {
	flex: 1;
	padding: 40px 0 64px;
}

/* Plain pages (terms, a notice, anything that is not the dashboard). */
.portal-page {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 40px 42px;
	max-width: 760px;
}

.portal-page h1 {
	font-family: var(--font-display);
	font-size: 28px;
	letter-spacing: -.022em;
	margin-bottom: 18px;
}

.portal-page h2 {
	font-family: var(--font-display);
	font-size: 20px;
	margin: 30px 0 10px;
}

.portal-page p { margin-bottom: 15px; color: var(--ink-2); }
.portal-page ul, .portal-page ol { margin: 0 0 16px 22px; color: var(--ink-2); }
.portal-page li { margin-bottom: 6px; }
.portal-page a { color: var(--brand); font-weight: 600; }

@media (max-width: 620px) {
	.portal-page { padding: 28px 22px; }
}

/* =====================================================================
   FOOTER
   ================================================================== */

.portal-footer {
	background: var(--brand-deep);
	color: rgba(255, 255, 255, .62);
	padding: 30px 0;
	font-size: 13.5px;
}

.portal-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	justify-content: space-between;
}

.portal-footer a {
	color: rgba(255, 255, 255, .82);
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.portal-footer a:hover { color: #fff; border-color: #fff; }

.portal-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}

/* =====================================================================
   404
   ================================================================== */

.portal-404 { text-align: left; max-width: 520px; }
.portal-404 h1 { font-family: var(--font-display); font-size: 26px; margin-bottom: 10px; }
.portal-404 p { color: var(--muted); margin-bottom: 20px; }

.portal-btn {
	display: inline-block;
	padding: 12px 22px;
	background: var(--brand);
	color: #fff;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
}
.portal-btn:hover { background: var(--brand-deep); }

/* =====================================================================
   DARK MODE

   The portal dashboard already answers prefers-color-scheme through its
   own tokens. The shell has to follow, or a client on a dark device gets
   a dark card sitting inside a bright white page.
   ================================================================== */

@media (prefers-color-scheme: dark) {
	:root {
		--ground: #0D1317;
		--card:   #151D25;
		--line:   #24303A;
		--ink:    #E6EDF3;
		--ink-2:  #B6C5D2;
		--muted:  #8B9BA8;
		--faint:  #7C8A99;
	}

	.portal-header { background: var(--card); }
	.portal-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
	.portal-page { background: var(--card); }
	.portal-page a { color: #A9A0F0; }
	.portal-brand__mark { background: var(--brand-soft); }
}
