/*
Theme Name:        Varity Ventures
Description:       Corporate theme for Varity Ventures, the parent company of its online businesses: portfolio of businesses, company details used across the site, ready-made legal pages for Canada and the United States, cookie consent (opt-in, Global Privacy Control), contact form and accessible, fast pages.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      7.1
Requires PHP:      7.4
Author:            Varity Ventures
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       varityventures
Tags:              one-column, custom-logo, custom-menu, featured-images, accessibility-ready
*/

/* ---------- Tokens ---------- */
:root {
	--vv-navy: #0b1f3a;
	--vv-navy-2: #132c4f;
	--vv-ink: #111827;
	--vv-text: #374151;
	--vv-muted: #6b7280;
	--vv-line: #e5e1d8;
	--vv-paper: #f7f5f0;
	--vv-white: #fff;
	--vv-accent: #b8862e;
	--vv-accent-ink: #7a5718;
	--vv-accent-soft: #f6eedd;
	--vv-focus: #2563eb;
	--vv-radius: 14px;
	--vv-shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 12px 32px -12px rgba(17, 24, 39, .18);
	--vv-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--vv-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--vv-header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--vv-header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--vv-white); color: var(--vv-text); font: 400 17px/1.7 var(--vv-font); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--vv-navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--vv-accent-ink); }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--vv-ink); font-family: var(--vv-serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--vv-focus); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.vv-skip:focus { position: fixed !important; top: 12px; left: 12px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 10px 16px; background: #fff; color: var(--vv-navy); border-radius: 8px; box-shadow: var(--vv-shadow); }
.vv-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.vv-container--narrow { max-width: 820px; }
.vv-section { padding: clamp(64px, 9vw, 112px) 0; }
.vv-section--paper { background: var(--vv-paper); }
.vv-eyebrow { margin: 0 0 12px; color: var(--vv-accent-ink); font: 700 .78rem/1.4 var(--vv-font); letter-spacing: .14em; text-transform: uppercase; }
.vv-lead { font-size: 1.15rem; color: var(--vv-text); }
.vv-muted { color: var(--vv-muted); }
.vv-head { max-width: 720px; margin: 0 0 48px; }
.vv-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.vv-icon { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Buttons ---------- */
.vv-btn, .wp-block-button__link, input[type="submit"], button.vv-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 12px 24px;
	border: 1px solid transparent; border-radius: 999px; background: var(--vv-navy); color: #fff;
	font: 600 15px/1.2 var(--vv-font); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.vv-btn:hover, .wp-block-button__link:hover, input[type="submit"]:hover { background: var(--vv-navy-2); color: #fff; transform: translateY(-1px); }
.vv-btn--accent { background: var(--vv-accent); color: #1a1205; }
.vv-btn--accent:hover { background: #a3761f; color: #fff; }
.vv-btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff; }
.vv-btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.vv-btn--outline { background: transparent; border-color: var(--vv-navy); color: var(--vv-navy); }
.vv-btn--outline:hover { background: var(--vv-navy); color: #fff; }
.vv-btn--sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }

/* ---------- Header ---------- */
.vv-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--vv-line); }
.admin-bar .vv-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .vv-header { top: 0; } }
.vv-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--vv-header-h); }
.vv-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--vv-navy); text-decoration: none; }
.vv-brand__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--vv-navy); color: var(--vv-accent); font: 700 18px/1 var(--vv-serif); letter-spacing: -.02em; }
.vv-brand__name { font: 600 1.25rem/1 var(--vv-serif); letter-spacing: -.01em; }
.custom-logo { max-height: 48px; width: auto; }
.vv-nav { display: flex; align-items: center; gap: 28px; }
.vv-menu { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.vv-menu a { color: var(--vv-ink); font-weight: 500; font-size: 15px; text-decoration: none; }
.vv-menu a:hover, .vv-menu .current-menu-item > a { color: var(--vv-accent-ink); }
.vv-menu .sub-menu { display: none; }
.vv-nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--vv-line); border-radius: 10px; background: #fff; color: var(--vv-ink); cursor: pointer; }
.vv-nav-toggle .vv-icon { width: 22px; height: 22px; }
.vv-nav-toggle [data-close] { display: none; }
@media (max-width: 900px) {
	.vv-nav-toggle { display: inline-flex; }
	.vv-nav { position: fixed; inset: var(--vv-header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px 24px 28px; background: #fff; border-bottom: 1px solid var(--vv-line); box-shadow: var(--vv-shadow); transform: translateY(-120%); visibility: hidden; transition: transform .25s, visibility .25s; }
	.vv-nav.is-open { transform: none; visibility: visible; }
	.vv-menu { flex-direction: column; gap: 4px; }
	.vv-menu a { display: block; padding: 10px 0; font-size: 17px; }
	.vv-nav-toggle[aria-expanded="true"] [data-open] { display: none; }
	.vv-nav-toggle[aria-expanded="true"] [data-close] { display: block; }
}

/* ---------- Hero ---------- */
.vv-hero { position: relative; overflow: hidden; padding: clamp(80px, 12vw, 150px) 0 clamp(72px, 10vw, 120px); background: radial-gradient(900px 500px at 85% -10%, rgba(184, 134, 46, .22), transparent 60%), linear-gradient(160deg, var(--vv-navy) 0%, #0e2748 60%, #10305a 100%); color: #d6deea; }
.vv-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 70% 20%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 20%, #000 10%, transparent 70%); pointer-events: none; }
.vv-hero .vv-container { position: relative; z-index: 1; }
.vv-hero .vv-eyebrow { color: #e3c487; }
.vv-hero h1 { max-width: 820px; color: #fff; }
.vv-hero__text { max-width: 640px; font-size: 1.2rem; }
.vv-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.vv-stats { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 56px 0 0; padding: 28px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); list-style: none; }
.vv-stats li { margin: 0; }
.vv-stats strong { display: block; color: #fff; font: 600 2rem/1.1 var(--vv-serif); }
.vv-stats span { font-size: 14px; }

/* ---------- Business cards ---------- */
.vv-businesses { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.vv-biz { position: relative; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--vv-line); border-radius: var(--vv-radius); background: #fff; transition: transform .2s, box-shadow .2s, border-color .2s; }
.vv-biz:hover { transform: translateY(-3px); box-shadow: var(--vv-shadow); border-color: #d8d1c2; }
.vv-biz__logo { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 20px; border-radius: 14px; background: var(--vv-paper); overflow: hidden; color: var(--vv-navy); font: 600 1.4rem/1 var(--vv-serif); }
.vv-biz__logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.vv-biz__cat { margin: 0 0 6px; color: var(--vv-accent-ink); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.vv-biz h3 { margin-bottom: 8px; }
.vv-biz h3 a { color: inherit; text-decoration: none; }
.vv-biz h3 a::after { content: ""; position: absolute; inset: 0; }
.vv-biz__text { flex: 1; margin-bottom: 16px; }
.vv-biz__link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; color: var(--vv-navy); font-weight: 600; font-size: 15px; }
.vv-biz__badge { position: absolute; top: 20px; right: 20px; padding: 3px 10px; border-radius: 999px; background: var(--vv-accent-soft); color: var(--vv-accent-ink); font-size: 12px; font-weight: 600; }

/* ---------- Pillars ---------- */
.vv-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.vv-pillar { padding: 4px 0 0; border-top: 2px solid var(--vv-accent); }
.vv-pillar h3 { margin-top: 18px; font-size: 1.15rem; }
.vv-pillar p { margin: 0; color: var(--vv-text); font-size: 15.5px; }
@media (max-width: 960px) { .vv-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .vv-pillars { grid-template-columns: 1fr; } }

/* ---------- About split ---------- */
.vv-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.vv-split__card { padding: 36px; border-radius: var(--vv-radius); background: var(--vv-navy); color: #d6deea; }
.vv-split__card h3 { color: #fff; }
.vv-facts { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.vv-facts li { display: flex; gap: 12px; margin: 0; font-size: 15px; }
.vv-facts .vv-icon { margin-top: 4px; color: #e3c487; }
@media (max-width: 860px) { .vv-split { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.vv-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(32px, 5vw, 56px); border-radius: 22px; background: linear-gradient(135deg, var(--vv-navy), #183a68); color: #d6deea; }
.vv-cta h2 { margin: 0 0 8px; color: #fff; }
.vv-cta p { margin: 0; }

/* ---------- Page hero + content ---------- */
.vv-page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(36px, 5vw, 56px); background: var(--vv-paper); border-bottom: 1px solid var(--vv-line); }
.vv-page-hero h1 { margin: 0; }
.vv-page-hero p { max-width: 700px; margin: 14px 0 0; }
.vv-prose { font-size: 17px; }
.vv-prose > * + * { margin-top: 0; }
.vv-prose h2 { margin-top: 2em; font-size: 1.65rem; }
.vv-prose h3 { margin-top: 1.6em; font-size: 1.2rem; }
.vv-prose ul, .vv-prose ol { padding-left: 1.3em; }
.vv-prose li { margin-bottom: .4em; }
.vv-prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: 15px; }
.vv-prose th, .vv-prose td { padding: 10px 12px; border: 1px solid var(--vv-line); text-align: left; vertical-align: top; }
.vv-prose th { background: var(--vv-paper); color: var(--vv-ink); }
.vv-prose blockquote, .vv-note { margin: 1.4em 0; padding: 16px 20px; border-left: 4px solid var(--vv-accent); border-radius: 0 10px 10px 0; background: var(--vv-accent-soft); }
.vv-placeholder { padding: 1px 6px; border-radius: 4px; background: #fff3c4; color: #7a5300; font-weight: 600; }

/* ---------- Legal layout ---------- */
.vv-legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.vv-toc { position: sticky; top: calc(var(--vv-header-h) + 24px); font-size: 14px; }
.vv-toc h2 { margin: 0 0 10px; font: 700 12px/1.4 var(--vv-font); letter-spacing: .12em; text-transform: uppercase; color: var(--vv-muted); }
.vv-toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--vv-line); }
.vv-toc li { margin: 0; }
.vv-toc a { display: block; margin-left: -2px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; color: var(--vv-text); text-decoration: none; }
.vv-toc a:hover, .vv-toc a.is-active { border-left-color: var(--vv-accent); color: var(--vv-ink); }
.vv-legal__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0 0; color: var(--vv-muted); font-size: 14px; }
.vv-legal__meta button { padding: 0; border: 0; background: none; color: var(--vv-navy); font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 960px) { .vv-legal { grid-template-columns: 1fr; } .vv-toc { position: static; } }
@media print { .vv-header, .vv-footer, .vv-toc, .vv-consent, .vv-legal__meta button { display: none !important; } .vv-legal { display: block; } body { font-size: 12pt; } }

/* ---------- Forms ---------- */
.vv-form { display: grid; gap: 18px; max-width: 680px; }
.vv-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.vv-form label { display: grid; gap: 6px; color: var(--vv-ink); font-weight: 600; font-size: 15px; }
.vv-form input[type="text"], .vv-form input[type="email"], .vv-form select, .vv-form textarea { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid #cfc9bc; border-radius: 10px; background: #fff; color: var(--vv-ink); font: 400 16px/1.4 var(--vv-font); }
.vv-form textarea { min-height: 160px; resize: vertical; }
.vv-form input:focus, .vv-form select:focus, .vv-form textarea:focus { outline: 3px solid rgba(37, 99, 235, .35); border-color: var(--vv-focus); }
.vv-form .vv-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.vv-form .vv-check input { width: 18px; height: 18px; margin-top: 4px; flex: none; }
.vv-hp { position: absolute !important; left: -9999px; }
.vv-alert { padding: 14px 18px; border-radius: 10px; border: 1px solid; font-size: 15px; }
.vv-alert--ok { border-color: #a7e3bf; background: #f0fbf4; color: #14532d; }
.vv-alert--error { border-color: #f6c1bd; background: #fff5f4; color: #7f1d1d; }
@media (max-width: 640px) { .vv-form__row { grid-template-columns: 1fr; } }
.vv-contact { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.vv-contact__card { padding: 28px; border: 1px solid var(--vv-line); border-radius: var(--vv-radius); background: var(--vv-paper); font-size: 15.5px; }
.vv-contact__card h2 { font-size: 1.3rem; }
.vv-contact__card address { font-style: normal; }
@media (max-width: 900px) { .vv-contact { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.vv-footer { padding: 72px 0 28px; background: var(--vv-navy); color: #b8c3d4; font-size: 15px; }
.vv-footer a { color: #e2e8f0; text-decoration: none; }
.vv-footer a:hover { color: #e3c487; text-decoration: underline; }
.vv-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.vv-footer .vv-brand { color: #fff; }
.vv-footer h2 { margin: 0 0 14px; color: #fff; font: 700 13px/1.4 var(--vv-font); letter-spacing: .1em; text-transform: uppercase; }
.vv-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.vv-footer address { margin-top: 16px; font-style: normal; line-height: 1.6; }
.vv-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; }
.vv-footer__bottom p { margin: 0; }
.vv-footer__bottom button { padding: 0; border: 0; background: none; color: #e2e8f0; font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 900px) { .vv-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .vv-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Cookie consent ---------- */
.vv-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; max-width: 560px; padding: 22px 24px; border: 1px solid var(--vv-line); border-radius: 16px; background: #fff; color: var(--vv-text); box-shadow: 0 24px 60px -20px rgba(17, 24, 39, .45); font-size: 15px; }
.vv-consent[hidden] { display: none; }
.vv-consent h2 { margin: 0 0 8px; font: 700 16px/1.3 var(--vv-font); color: var(--vv-ink); }
.vv-consent p { margin: 0 0 14px; }
.vv-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vv-consent__gpc { margin: 10px 0 0 !important; padding: 8px 12px; border-radius: 8px; background: var(--vv-paper); font-size: 13.5px; }

/* ---------- Blog ---------- */
.vv-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.vv-post-card { border: 1px solid var(--vv-line); border-radius: var(--vv-radius); overflow: hidden; background: #fff; }
.vv-post-card__body { padding: 24px; }
.vv-post-card h2 { font-size: 1.3rem; }
.vv-post-card h2 a { color: inherit; text-decoration: none; }
.vv-pagination { margin-top: 40px; }
.vv-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.vv-pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--vv-line); border-radius: 8px; text-decoration: none; }
.vv-pagination .current { background: var(--vv-navy); color: #fff; border-color: var(--vv-navy); }

/* WordPress core */
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption-text, figcaption { color: var(--vv-muted); font-size: 14px; }
.sticky, .bypostauthor, .gallery-caption { outline: 0; }
.vv-footer .vv-brand__mark { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
