/*
Theme Name: Vivid Arc
Description: Vivid Arc Studios — branded storefront and player theme for the protected/open video system. Dark, cinematic, mobile-first.
Version: 0.1.0
Author: Vivid Arc Studios
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: vivid-arc
*/

/* ------------------------------------------------------------------
   Brand tokens — gold values sampled directly from the real Vivid Arc
   logo (brand-assets/logo.png). Swap values here only; everything
   below reads from these variables.
   ------------------------------------------------------------------ */
:root {
	--va-bg: #0d0d13;
	--va-surface: #17171f;
	--va-surface-2: #1f1f2a;
	--va-border: #2b2b38;
	--va-text: #f4f2ee;
	--va-muted: #a09eae;
	--va-accent: #f0cc78;        /* logo gold */
	--va-accent-2: #fcf0c0;      /* logo highlight cream */
	--va-arc-gradient: linear-gradient(100deg, var(--va-accent), var(--va-accent-2));
	--va-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* placeholder until brand fonts arrive */
	--va-radius: 12px;
	--va-max-width: 1100px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--va-bg);
	color: var(--va-text);
	font-family: var(--va-font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--va-accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

img { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; }

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

/* ---------- Header ---------- */
.va-header {
	border-bottom: 1px solid var(--va-border);
	background: rgba(13, 13, 19, 0.95);
}

.va-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 24px;
	padding: 16px 20px;
	max-width: var(--va-max-width);
	margin: 0 auto;
}

.va-logo {
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: var(--va-text);
}
.va-logo:hover { text-decoration: none; }

.va-logo__arc {
	background: var(--va-arc-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.va-header .custom-logo-link { display: flex; align-items: center; }
.va-header .custom-logo-link img.custom-logo { max-height: 88px; width: auto; display: block; }

.va-about__logo { max-width: 320px; width: 100%; height: auto; display: block; margin: 32px auto 0; }

.va-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.va-nav a { color: var(--va-muted); font-weight: 600; }
.va-nav a:hover { color: var(--va-text); text-decoration: none; }

/* ---------- Hero (front page) ---------- */
.va-hero {
	position: relative;
	padding: 100px 0 64px;
	text-align: center;
	background-size: cover;
	background-position: center 46%;
	overflow: hidden;
}

.va-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(13, 13, 19, 0.78) 0%, rgba(13, 13, 19, 0.88) 55%, var(--va-bg) 100%);
}

.va-hero > .va-container { position: relative; z-index: 1; }

.va-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 12px; }

.va-hero__tagline {
	color: var(--va-muted);
	font-size: 1.15rem;
	max-width: 560px;
	margin: 0 auto 28px;
}

/* ---------- Buttons ---------- */
.va-button {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 999px;
	background: var(--va-arc-gradient);
	color: #14060b;
	font-weight: 700;
	font-size: 1rem;
	border: none;
	cursor: pointer;
}
.va-button:hover, .va-button:focus { text-decoration: none; filter: brightness(1.08); }

/* ---------- Title grid / cards ---------- */
.va-section { padding: 40px 0 64px; }

.va-section__heading {
	font-size: 1.5rem;
	margin: 0 0 20px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--va-border);
}

.va-section__subheading {
	font-size: 1.1rem;
	color: var(--va-muted);
	margin: 36px 0 16px;
}
.va-section__subheading:first-of-type { margin-top: 0; }

.va-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.va-card {
	background: var(--va-surface);
	border: 1px solid var(--va-border);
	border-radius: var(--va-radius);
	overflow: hidden;
	transition: transform 0.15s ease, border-color 0.15s ease;
}
.va-card:hover { transform: translateY(-3px); border-color: var(--va-accent); }

.va-card__thumb {
	aspect-ratio: 9 / 16;
	background: var(--va-surface-2);
	display: block;
}
.va-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.va-card__body { padding: 14px 16px 18px; }

.va-card__title { font-size: 1.05rem; margin: 0 0 8px; }
.va-card__title a { color: var(--va-text); }

.va-badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 999px;
}
.va-badge--free { background: rgba(252, 240, 192, 0.15); color: var(--va-accent-2); }
.va-badge--gated { background: rgba(240, 204, 120, 0.15); color: var(--va-accent); }
.va-badge--series { background: transparent; border: 1px solid var(--va-border); color: var(--va-muted); }

/* ---------- Single title page ---------- */
.va-title-page { padding: 32px 0 64px; }

.va-title-page h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 6px; }

.va-title-page__meta { color: var(--va-muted); margin: 0 0 20px; }

.va-title-page__content { max-width: 720px; color: var(--va-muted); }
.va-title-page__content p { margin: 0 0 1em; }

/* ---------- Players ---------- */
.va-player {
	margin: 0 0 28px;
	border-radius: var(--va-radius);
	overflow: hidden;
	background: #000;
}

.va-player--youtube { aspect-ratio: 16 / 9; }
.va-player--youtube iframe { width: 100%; height: 100%; border: 0; display: block; }

/* YouTube click-to-load facade: real thumbnail + our own play button, until clicked. */
.va-yt-facade { position: relative; cursor: pointer; background: #000; }
.va-yt-facade__thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.va-yt-facade__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: transform 0.15s ease;
}
.va-yt-facade__play:hover, .va-yt-facade__play:focus-visible { transform: translate(-50%, -50%) scale(1.08); }

.va-player video, .va-player .wp-video { width: 100% !important; display: block; }

/* Self-hosted: box matches the file's real dimensions so it never stretches
   or letterboxes, whichever way it was actually shot. */
.va-player--selfhosted-vertical { aspect-ratio: 9 / 16; }
.va-player--selfhosted-vertical video, .va-player--selfhosted-vertical .wp-video {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
}
.va-player--selfhosted-horizontal { aspect-ratio: 16 / 9; }
.va-player--selfhosted-horizontal video, .va-player--selfhosted-horizontal .wp-video {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
}

/* VdoCipher injects its own responsive player; the wrapper just frames it. */
.va-player--vdocipher iframe { width: 100%; border: 0; }

/* ---------- Locked card ---------- */
.va-locked {
	position: relative;
	border-radius: var(--va-radius);
	overflow: hidden;
	background-color: var(--va-surface);
	background-size: cover;
	background-position: center;
	margin: 0 0 28px;
}

.va-locked__inner {
	background: linear-gradient(180deg, rgba(13, 13, 19, 0.75), rgba(13, 13, 19, 0.92));
	padding: 64px 24px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	min-height: 320px;
	justify-content: center;
}

.va-locked__badge {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--va-accent);
}

.va-locked__note { color: var(--va-muted); margin: 0; max-width: 460px; }

/* ---------- Notices ---------- */
.va-player-notice {
	background: var(--va-surface);
	border: 1px solid var(--va-border);
	border-radius: var(--va-radius);
	padding: 24px;
	color: var(--va-muted);
	margin: 0 0 28px;
}
.va-player-notice--editor { border-color: var(--va-accent-2); color: var(--va-text); }

/* ---------- Generic content / pages ---------- */
.va-content { padding: 40px 0 64px; max-width: 720px; }
.va-content p { margin: 0 0 1.1em; line-height: 1.7; color: var(--va-muted); }

/* ---------- Reusable page hero (About, Series, and future simple pages) ---------- */
.va-page-title { text-align: center; }

.va-page-cover {
	max-width: 420px;
	margin: 24px auto 36px;
	border-radius: var(--va-radius);
	overflow: hidden;
	border: 1px solid var(--va-border);
}
.va-page-cover img { width: 100%; display: block; }

.va-page-signature {
	margin: 40px 0 0;
	padding-top: 28px;
	border-top: 1px solid var(--va-border);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--va-text);
}

@media (max-width: 600px) {
	.va-page-cover { max-width: 100%; }
}

/* ---------- Series page: episode grid ---------- */
.va-series__watch-heading { margin: 48px 0 20px; padding-top: 32px; border-top: 1px solid var(--va-border); }

.va-episode-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: none;
}

.va-episode-card { background: var(--va-surface); border: 1px solid var(--va-border); border-radius: var(--va-radius); overflow: hidden; }

.va-episode-card__label {
	padding: 10px 12px;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--va-muted);
}

.va-episode-card .va-player,
.va-episode-card .va-locked,
.va-episode-card .va-player-notice { margin: 0; border-radius: 0; }

/* Vertical (YouTube Shorts) video — avoids letterboxing a 9:16 video in a 16:9 box. */
.va-player--youtube-vertical { aspect-ratio: 9 / 16; }
.va-player--youtube-vertical iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */
.va-footer {
	border-top: 1px solid var(--va-border);
	padding: 28px 0;
	color: var(--va-muted);
	font-size: 0.9rem;
}

.va-footer .va-container > .va-footer__bottom {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.va-footer__whatsapp {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--va-surface);
	border: 1px solid var(--va-border);
	border-radius: var(--va-radius);
	padding: 14px 18px;
	margin-bottom: 24px;
	text-decoration: none;
	transition: border-color 0.15s ease;
}
.va-footer__whatsapp:hover { border-color: var(--va-accent); text-decoration: none; }

.va-footer__whatsapp img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	object-position: top center;
	border-radius: 8px;
	flex-shrink: 0;
}

.va-footer__whatsapp-text strong { display: block; color: var(--va-text); font-size: 1rem; }
.va-footer__whatsapp-text span { color: var(--va-muted); font-size: 0.85rem; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	body { font-size: 16px; }
	.va-hero { padding: 48px 0 36px; }
	.va-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
	.va-locked__inner { padding: 40px 16px; min-height: 240px; }
}
