/*
Theme Name: RPSS Website 2 - Scrolling
Theme URI: https://digitaltechfusion.ca
Author: Digital Tech Fusion
Author URI: https://digitaltechfusion.ca
Description: R&P Safety Solutions - the PowerPoint hero at full screen, with About Us, Services and Contact continuing below it as you scroll. Requires the RPSS Site plugin.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: rpss
*/

:root {
	--u: min(1vw, 1.7778vh);
	--hero-h: 100vh;
	--bar-h: 56px;
	--ink: #1f1f1f;
	--ink-2: #4a4a4a;
	--paper: #ffffff;
	--paper-2: #f3f3f3;
	--charcoal: #262626;
	--accent: #e8661c;
	--glow: rgba(231, 230, 230, .40);
	--font: Calibri, Carlito, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--font-copy: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
@supports (height: 100svh) { :root { --hero-h: 100svh; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { clip: auto; width: auto; height: auto; z-index: 100; top: 8px; left: 8px; background: #fff; color: #000; padding: 10px 14px; }
.w2-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ---------------- Top bar ---------------- */
.w2-bar {
	position: fixed; z-index: 50; top: 0; left: 0; right: 0;
	height: max(48px, calc(var(--u) * 3.43));
	display: flex; align-items: center; justify-content: flex-end;
	padding: 0 calc(var(--u) * 3.9) 0 calc(var(--u) * 2.4);
	background: rgba(173, 173, 173, .59);
	transition: background-color .25s ease, box-shadow .25s ease;
}
.admin-bar .w2-bar { top: 32px; }
.w2-bar.is-solid { background: rgba(34, 34, 34, .96); box-shadow: 0 2px 16px rgba(0, 0, 0, .25); }
@supports (backdrop-filter: blur(8px)) { .w2-bar.is-solid { background: rgba(34, 34, 34, .86); backdrop-filter: blur(10px); } }
.w2-bar__mark { margin-right: auto; display: block; line-height: 0; opacity: 0; visibility: hidden; transition: opacity .25s ease; }
.w2-bar__mark img { height: 28px; width: auto; }
.w2-bar.is-solid .w2-bar__mark { opacity: 1; visibility: visible; }

.w2-nav { display: flex; align-items: center; }
.w2-nav__list { list-style: none; margin: 0; padding: 0; display: flex; }
.w2-nav__list li { width: calc(var(--u) * 9.6); min-width: 96px; text-align: center; }
.w2-nav__list a { display: inline-block; padding: 6px 4px; font-size: max(15px, calc(var(--u) * 1.67)); color: #fff; text-decoration: none; white-space: nowrap; }
.w2-nav__list a:hover, .w2-nav__list a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.w2-nav__list .current-menu-item > a, .w2-nav__list a[aria-current="page"] { font-weight: 700; }
.w2-nav__logins { display: none; }
.w2-bar.is-solid .w2-nav__logins { display: flex; }
.w2-bar.is-solid .w2-nav__logins li { width: auto; min-width: 0; padding-left: 14px; }
.w2-bar.is-solid .w2-nav__logins a { font-size: 15px; border: 1px solid rgba(255,255,255,.5); border-radius: 4px; padding: 5px 12px; }
.w2-burger { display: none; }

/* ---------------- Hero (= PowerPoint home slide) ---------------- */
.w2-hero { position: relative; height: var(--hero-h); min-height: 520px; overflow: hidden; color: #fff; background: #1b1b1b; }
.w2-hero__bg { position: absolute; inset: 0; background: var(--rpss-hero) center center / cover no-repeat; }
.w2-hero__brand { position: absolute; z-index: 2; margin: 0; left: calc(var(--u) * 2.4); top: calc(var(--u) * 1.65); width: calc(var(--u) * 56.2); max-width: 900px; line-height: 0; }
.admin-bar .w2-hero__brand { top: calc(var(--u) * 1.65 + 32px); }
.w2-hero__brand img { width: 100%; display: block; }

.w2-glow { position: relative; isolation: isolate; color: #fff; font-weight: 700; text-shadow: 0 0 1px rgba(0, 0, 0, .25); }
.w2-glow::before { content: ""; position: absolute; z-index: -1; inset: -.05em -.25em; background: var(--glow); filter: blur(calc(var(--u) * .9)); border-radius: .4em; }

.w2-hero__logins { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.w2-login { position: absolute; pointer-events: auto; right: calc(var(--u) * 4.3); width: calc(var(--u) * 19.8); text-align: center; font-size: max(18px, calc(var(--u) * 2.5)); line-height: 1.2; text-decoration: none; white-space: nowrap; padding: .15em 0; transition: transform .15s ease; }
.w2-login:nth-child(1) { top: 43.2%; }
.w2-login:nth-child(2) { top: 58%; }
.w2-login:hover, .w2-login:focus-visible { transform: scale(1.04); outline: none; }
.w2-login:focus-visible::before { background: rgba(255, 255, 255, .55); }

.w2-hero__tagline { position: absolute; z-index: 2; margin: 0; right: calc(var(--u) * 1.9); bottom: 3.4%; max-width: 19em; font-size: max(16px, calc(var(--u) * 2.08)); line-height: 1.2; text-align: right; text-wrap: balance; }
.w2-hero__copy { position: absolute; z-index: 2; margin: 0; left: calc(var(--u) * 1.9); bottom: 2.6%; font-family: var(--font-copy); font-size: max(12px, calc(var(--u) * 1.15)); }
.w2-hero__more {
	position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%);
	width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
	color: #fff; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .45);
	animation: w2-bob 2.4s ease-in-out infinite;
}
.w2-hero__more:hover, .w2-hero__more:focus-visible { background: rgba(0, 0, 0, .45); }
@keyframes w2-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ---------------- Sections ---------------- */
.w2-section { padding: clamp(64px, 9vw, 128px) 0; }
.w2-section__grid { display: grid; grid-template-columns: minmax(220px, 1fr) 2.1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.w2-section__head { position: sticky; top: calc(var(--bar-h) + 32px); }
.w2-section__title { margin: 0; font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.05; font-weight: 700; letter-spacing: -.01em; }
.w2-prose > * { margin: 0 0 1.1em; }
.w2-prose > *:last-child { margin-bottom: 0; }
.w2-section .w2-prose p { font-size: clamp(1.1rem, 1.35vw, 1.28rem); line-height: 1.65; max-width: 66ch; }
.w2-section .has-text-align-center { text-align: left; }
.w2-prose a:not(.rpss-btn) { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.w2-section--about { background: var(--paper-2); }
.w2-section--about .w2-prose p:first-child { font-size: clamp(1.25rem, 1.75vw, 1.55rem); line-height: 1.5; color: var(--ink); }
.w2-section--about .w2-prose p { color: var(--ink-2); }

.w2-section--services {
	--rpss-fg: #fff; --rpss-muted: #cfcfcf; --rpss-line: rgba(255,255,255,.35); --rpss-btn-bg: #fff; --rpss-btn-fg: #1f1f1f;
	background: var(--charcoal); color: #fff; position: relative; overflow: hidden;
}
.w2-section--services::before {
	content: ""; position: absolute; inset: 0; opacity: .12;
	background: var(--rpss-hero) 80% 30% / cover no-repeat; filter: grayscale(1);
	mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
	-webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}
.w2-section--services > * { position: relative; }
.w2-section--services .w2-prose p { color: #e9e9e9; }
.w2-cta { margin-top: clamp(40px, 6vw, 72px); padding: 24px 28px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; background: rgba(255, 255, 255, .04); }
.w2-cta p { margin: 0; font-size: 1.25rem; font-weight: 700; }
.w2-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; }

.w2-section--contact { background: var(--paper); }
.w2-section--contact .rpss-contact { margin-top: 28px; padding: 28px; background: var(--paper-2); border-radius: 8px; max-width: 760px; }

/* ---------------- Inner pages (logins, portals, account) ---------------- */
.w2-band { position: relative; color: #fff; background: #1b1b1b; height: 34vh; min-height: 220px; max-height: 340px; display: flex; align-items: flex-end; padding-bottom: 28px; }
.w2-band__bg { position: absolute; inset: 0; background: var(--rpss-hero) center 30% / cover no-repeat; }
.w2-band__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.65)); }
.w2-band .w2-wrap { position: relative; }
.w2-band__title { margin: 0; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.1; }
.w2-inner { background: var(--paper-2); padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); min-height: 40vh; }
.w2-inner--wide .w2-wrap { max-width: 1240px; }
.w2-inner .rpss-portal__title { display: none; } /* the hero band already shows the page title */
.w2-inner--login .rpss-form { box-shadow: 0 12px 40px rgba(0, 0, 0, .12); }
.w2-inner .rpss-card, .w2-inner .rpss-res, .w2-inner .rpss-tile { box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }

/* ---------------- Footer ---------------- */
.w2-footer { background: #1b1b1b; color: #d9d9d9; padding: 48px 0 40px; }
.w2-footer__inner { display: grid; gap: 22px; }
.w2-footer__logo { display: block; width: min(420px, 100%); line-height: 0; }
.w2-footer__links { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.w2-footer__links a { color: #fff; text-decoration: none; font-weight: 600; }
.w2-footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.w2-footer__copy { margin: 0; font-family: var(--font-copy); font-size: 13px; color: #a9a9a9; }
.w2-footer__copy a { color: #d9d9d9; }

/* ---------------- Tablet portrait & phones ---------------- */
@media (max-width: 820px), (orientation: portrait) and (max-width: 1100px) {
	:root { --u: 1vw; --bar-h: 56px; }
	.w2-bar { height: 56px; padding: 0 6px 0 16px; }
	.w2-hero__bg { background-position: 32% center; }
	.w2-hero__brand { left: 5vw; top: 70px; width: 90vw; }
	.admin-bar .w2-hero__brand { top: 116px; }

	.w2-burger { display: block; position: relative; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; }
	.w2-burger__lines, .w2-burger__lines::before, .w2-burger__lines::after { position: absolute; left: 12px; width: 24px; height: 2px; background: #fff; content: ""; transition: transform .2s ease; }
	.w2-burger__lines { top: 23px; }
	.w2-burger__lines::before { top: -8px; left: 0; }
	.w2-burger__lines::after { top: 8px; left: 0; }
	.w2-burger[aria-expanded="true"] .w2-burger__lines { background: transparent; }
	.w2-burger[aria-expanded="true"] .w2-burger__lines::before { transform: translateY(8px) rotate(45deg); }
	.w2-burger[aria-expanded="true"] .w2-burger__lines::after { transform: translateY(-8px) rotate(-45deg); }

	.w2-nav { position: fixed; top: 56px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; background: rgba(40, 40, 40, .97); padding: 8px 0 14px; }
	.admin-bar .w2-nav { top: 102px; }
	.w2-nav.is-open { display: flex; }
	.w2-nav__list { flex-direction: column; }
	.w2-nav__list li { width: auto; text-align: left; }
	.w2-nav__list a { display: block; padding: 14px 24px; font-size: 19px; }
	.w2-nav__logins, .w2-bar.is-solid .w2-nav__logins { display: flex; border-top: 1px solid rgba(255, 255, 255, .2); margin-top: 8px; padding-top: 8px; }
	.w2-bar.is-solid .w2-nav__logins li { padding-left: 0; }
	.w2-bar.is-solid .w2-nav__logins a { border: 0; font-size: 19px; padding: 14px 24px; }

	.w2-hero__logins { inset: auto 0 calc(9% + 84px) 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
	.w2-hero::after { content: ""; position: absolute; inset: 40% 0 0 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .62)); }
	.w2-glow::before { display: none; }
	.w2-glow { text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
	.w2-login {
		position: static; width: min(82vw, 320px); padding: 13px 18px; font-size: 21px; border-radius: 8px;
		background: rgba(30, 30, 30, .5); border: 1px solid rgba(255, 255, 255, .7);
		-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	}
	.w2-login:hover, .w2-login:focus-visible { transform: none; background: rgba(30, 30, 30, .7); }
	.w2-hero__tagline { left: 5vw; right: 5vw; bottom: calc(3% + 64px); max-width: none; text-align: center; font-size: 18px; }
	.w2-hero__copy { display: none; }
	.w2-hero__more { bottom: 12px; width: 44px; height: 44px; }

	.w2-section__grid { grid-template-columns: 1fr; gap: 18px; }
	.w2-section__head { position: static; }
	.w2-wrap { padding: 0 20px; }
	.w2-section--contact .rpss-contact { padding: 20px; }
}

@media (max-width: 782px) { .admin-bar .w2-bar { top: 46px; } .admin-bar .w2-nav { top: 102px; } }

@media (prefers-reduced-motion: reduce) {
	.w2-hero__more { animation: none; }
	.w2-login, .w2-bar { transition: none; }
}

@media print {
	.w2-bar, .w2-hero__logins, .w2-hero__more { display: none !important; }
	.w2-hero { height: auto; min-height: 0; padding: 20px 0; }
}
