/*
Theme Name: Pabau Referrals
Theme URI:  https://referral.pabau.com
Author:     Pabau
Author URI: https://pabau.com
Description: Minimal classic theme paired with the Pabau Referrals plugin. Provides the marketing landing page, shared header/footer chrome, and intentionally gets out of the way on the plugin's full-bleed app pages (signup, login, verify-email, profile, dashboard).
Version:    1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License:    GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pabau-referrals-theme
*/

/* ====================================================================== *
 *  Variables + reset
 *
 *  Variables intentionally mirror the plugin's brand tokens so the
 *  theme chrome and the plugin's content blend seamlessly.
 * ====================================================================== */

:root {
	--p-brand:        #1d9ec6;
	--p-brand-2:      #117a9c;
	--p-brand-light:  #e8f6fb;
	--p-text:         #0f172a;
	--p-muted:        #475569;
	--p-soft:         #64748b;
	--p-border:       #e2e8f0;
	--p-bg:           #f6f8fb;
	--p-bg-2:         #ffffff;
	--p-shadow-sm:    0 1px 2px rgba(15, 23, 42, .06);
	--p-shadow:       0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
	--p-shadow-md:    0 4px 12px rgba(15, 23, 42, .08);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--p-text);
	background: var(--p-bg-2);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a {
	color: var(--p-brand);
	text-decoration: none;
}
a:hover { color: var(--p-brand-2); }

/* WP admin bar offset — keep our sticky header below it. */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .site-header { top: 46px; }
}

/* ====================================================================== *
 *  Layout primitives
 * ====================================================================== */

.site-container {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
}

.site-main {
	min-height: 60vh;
}

/* ====================================================================== *
 *  Header
 * ====================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(160%) blur(8px);
	border-bottom: 1px solid var(--p-border);
}

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

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	color: var(--p-text);
	font-size: 16px;
	letter-spacing: -0.01em;
}
.site-brand:hover { color: var(--p-text); }

/* The square-with-gradient logo mark. Avoids needing a static asset. */
.site-brand-mark {
	width: 28px;
	height: 28px;
	border-radius: 7px;
	background: linear-gradient(135deg, var(--p-brand), var(--p-brand-2));
	box-shadow: 0 4px 10px rgba(29, 158, 198, .35);
}

.site-nav {
	display: flex;
	gap: 8px;
	align-items: center;
}
.site-nav a {
	color: var(--p-muted);
	font-size: 14px;
	font-weight: 500;
	padding: 8px 12px;
	border-radius: 8px;
}
.site-nav a:hover {
	color: var(--p-text);
	background: var(--p-bg);
}
.site-nav .site-nav-cta {
	background: var(--p-brand);
	color: #fff;
	padding: 8px 16px;
	font-weight: 600;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(29, 158, 198, .35);
}
.site-nav .site-nav-cta:hover {
	background: var(--p-brand-2);
	color: #fff;
}

/* ====================================================================== *
 *  Front-page hero
 * ====================================================================== */

.hero {
	position: relative;
	padding: 96px 0 80px;
	background:
		radial-gradient(800px 320px at 15% 0%, rgba(29, 158, 198, .14), transparent 60%),
		radial-gradient(900px 360px at 85% 100%, rgba(17, 122, 156, .12), transparent 60%),
		var(--p-bg-2);
	overflow: hidden;
}

.hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px;
	background: var(--p-brand-light);
	color: var(--p-brand-2);
	font-size: 13px;
	font-weight: 600;
	border-radius: 999px;
	margin-bottom: 20px;
}
.hero-eyebrow::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--p-brand);
}

.hero-title {
	font-size: clamp(36px, 5vw, 56px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.025em;
	margin: 0 0 20px;
	max-width: 720px;
}
.hero-title em {
	font-style: normal;
	background: linear-gradient(120deg, var(--p-brand) 0%, var(--p-brand-2) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero-sub {
	font-size: clamp(16px, 1.4vw, 19px);
	color: var(--p-muted);
	max-width: 580px;
	margin: 0 0 32px;
}

.hero-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* ====================================================================== *
 *  Button primitives (used on landing pages, not on plugin pages)
 * ====================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 22px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 10px;
	border: 0;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
	background: var(--p-brand);
	color: #fff;
	box-shadow: 0 4px 14px rgba(29, 158, 198, .35);
}
.btn-primary:hover {
	background: var(--p-brand-2);
	color: #fff;
}
.btn-ghost {
	background: transparent;
	color: var(--p-text);
	border: 1px solid var(--p-border);
}
.btn-ghost:hover {
	background: var(--p-bg);
}

/* ====================================================================== *
 *  "How it works" feature row
 * ====================================================================== */

.features {
	padding: 80px 0;
	background: var(--p-bg);
	border-top: 1px solid var(--p-border);
	border-bottom: 1px solid var(--p-border);
}

.features-head {
	text-align: center;
	max-width: 600px;
	margin: 0 auto 48px;
}
.features-head h2 {
	font-size: clamp(28px, 3.5vw, 38px);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 12px;
}
.features-head p {
	margin: 0;
	color: var(--p-muted);
	font-size: 17px;
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.feature-card {
	background: var(--p-bg-2);
	border: 1px solid var(--p-border);
	border-radius: 16px;
	padding: 28px 24px;
	box-shadow: var(--p-shadow-sm);
	transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--p-shadow-md);
}
.feature-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--p-brand-light);
	color: var(--p-brand-2);
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 14px;
}
.feature-card h3 {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
}
.feature-card p {
	margin: 0;
	color: var(--p-muted);
	font-size: 15px;
}

/* ====================================================================== *
 *  Closing CTA banner
 * ====================================================================== */

.cta {
	padding: 80px 0;
	background: linear-gradient(135deg, #0c4a6e 0%, var(--p-brand) 100%);
	color: #fff;
	text-align: center;
}
.cta h2 {
	font-size: clamp(28px, 3.5vw, 38px);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 12px;
}
.cta p {
	margin: 0 0 28px;
	font-size: 17px;
	opacity: .85;
	max-width: 580px;
	margin-left: auto;
	margin-right: auto;
}
.cta .btn-primary {
	background: #fff;
	color: var(--p-brand-2);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}
.cta .btn-primary:hover {
	background: #f1f5f9;
	color: var(--p-brand-2);
}

/* ====================================================================== *
 *  Generic page (page.php content)
 * ====================================================================== */

.page-content {
	padding: 64px 0;
	min-height: 60vh;
}
.page-content h1 {
	font-size: clamp(28px, 3.5vw, 38px);
	font-weight: 700;
	margin: 0 0 16px;
	letter-spacing: -0.02em;
}
.page-content p {
	color: var(--p-muted);
	line-height: 1.7;
}
.page-content h2 {
	font-size: 22px;
	margin-top: 32px;
	margin-bottom: 8px;
}

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

.error-404 {
	padding: 96px 24px;
	text-align: center;
	max-width: 520px;
	margin: 0 auto;
}
.error-404 h1 {
	font-size: 88px;
	line-height: 1;
	margin: 0;
	background: linear-gradient(135deg, var(--p-brand) 0%, var(--p-brand-2) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-weight: 800;
}
.error-404 p {
	color: var(--p-muted);
	font-size: 17px;
	margin: 12px 0 24px;
}

/* ====================================================================== *
 *  Footer
 * ====================================================================== */

.site-footer {
	padding: 32px 0;
	border-top: 1px solid var(--p-border);
	background: var(--p-bg-2);
	color: var(--p-muted);
	font-size: 14px;
}
.site-footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}
.site-footer-links {
	display: flex;
	gap: 20px;
}
.site-footer-links a {
	color: var(--p-muted);
}
.site-footer-links a:hover {
	color: var(--p-text);
}

/* ====================================================================== *
 *  App pages: when a plugin shortcode owns the page, the theme renders
 *  no header/footer. The plugin's own CSS handles the full-bleed layout.
 *  The class below lets us add a hairline of body-level reset on those
 *  pages without fighting the plugin styles.
 * ====================================================================== */

body.pabau-app-page {
	background: var(--p-bg);
}
body.pabau-app-page .site-main {
	min-height: auto;
}

/* ====================================================================== *
 *  Responsive
 * ====================================================================== */

@media (max-width: 720px) {
	.site-header-inner { height: 56px; }
	.site-nav a { padding: 6px 10px; font-size: 13px; }
	.site-nav .site-nav-cta { padding: 8px 14px; }
	.hero { padding: 64px 0 56px; }
	.features { padding: 56px 0; }
	.features-grid { grid-template-columns: 1fr; }
	.cta { padding: 56px 0; }
	.site-footer-inner { justify-content: center; text-align: center; }
}

/* Skip-link (a11y default WP expects to exist) */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: #fff;
	border-radius: 3px;
	box-shadow: var(--p-shadow);
	clip: auto !important;
	color: var(--p-brand-2);
	display: block;
	font-weight: 600;
	height: auto;
	left: 5px;
	padding: 12px 20px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}
