/*
Theme Name:  RenderJam
Description: Cinematic dark theme for the RenderJam AI video & music studio. Landing page, pricing, signup and app chrome.
Author:      Simeon Kirilov
Version:     0.3.0
Requires at least: 6.4
Requires PHP: 8.0
License:     GPL-2.0-or-later
Text Domain: renderjam
*/

/* =====================================================================
   Design tokens
   ===================================================================== */
:root {
	--ink: #0b0d12;          /* page base */
	--ink-2: #12151d;        /* raised panels */
	--ink-3: #1a1e29;        /* borders/inputs */
	--cream: #f5f2ea;        /* primary text on dark */
	--cream-dim: #b9b5a9;    /* secondary text on dark */
	--coral: #ff4d3d;        /* video accent */
	--coral-deep: #d93a2c;
	--teal: #27e0b8;         /* music accent */
	--paper: #faf9f6;        /* light sections / app background */
	--paper-2: #ffffff;
	--ink-on-paper: #16181f;
	--muted-on-paper: #6b7280;
	--line-on-paper: #e5e3dc;
	--radius: 14px;
	--radius-lg: 22px;
	--font-display: 'Space Grotesk', system-ui, sans-serif;
	--font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--wrap: 1120px;
}

/* =====================================================================
   Base
   ===================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--ink);
	color: var(--cream);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
.rl-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* Buttons */
.rl-btn {
	display: inline-block;
	background: var(--coral);
	color: #fff !important;
	font-weight: 700;
	font-family: var(--font-display);
	padding: 13px 26px;
	border-radius: 999px;
	border: 0;
	text-decoration: none;
	cursor: pointer;
	transition: transform .15s ease, background .15s ease;
}
.rl-btn:hover { background: var(--coral-deep); transform: translateY(-1px); }
.rl-btn-ghost {
	background: transparent;
	border: 1px solid var(--ink-3);
	color: var(--cream) !important;
}
.rl-btn-ghost:hover { background: var(--ink-2); }

/* =====================================================================
   Header
   ===================================================================== */
.rl-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(11, 13, 18, 0.82);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(245, 242, 234, 0.07);
}
.rl-header-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 14px 22px;
	max-width: var(--wrap);
	margin: 0 auto;
}
.rl-logo {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 22px;
	text-decoration: none;
	letter-spacing: -0.02em;
}
.rl-logo .dot { color: var(--coral); }
.rl-logo-link { display: inline-flex; align-items: center; }
.rl-logo-img { height: 40px; width: auto; display: block; }
.rl-auth-brand .rl-logo-img { height: 44px; }
.rl-hero-logo { width: min(320px, 72%); height: auto; margin: 0 auto 24px; display: block; filter: drop-shadow(0 18px 40px rgba(255, 45, 85, 0.25)); }
.rl-prod-logo { width: min(230px, 55%); height: auto; margin: 0 auto 20px; display: block; }
.rl-nav { display: flex; align-items: center; gap: 26px; }
.rl-nav a { text-decoration: none; color: var(--cream-dim); font-weight: 500; font-size: 15px; }
.rl-nav a:hover { color: var(--cream); }
.rl-nav .rl-btn { padding: 9px 20px; font-size: 15px; }

/* =====================================================================
   Hero
   ===================================================================== */
.rl-hero { position: relative; padding: 90px 0 70px; overflow: hidden; text-align: center; }
.rl-hero::before {
	content: '';
	position: absolute;
	inset: -40% -20% auto;
	height: 130%;
	background:
		radial-gradient(38% 45% at 28% 30%, rgba(255, 77, 61, 0.16), transparent 70%),
		radial-gradient(34% 42% at 74% 24%, rgba(39, 224, 184, 0.12), transparent 70%);
	pointer-events: none;
}
.rl-hero > * { position: relative; }
.rl-kicker {
	display: inline-block;
	border: 1px solid var(--ink-3);
	background: var(--ink-2);
	color: var(--cream-dim);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 26px;
}
.rl-hero p.rl-sub {
	max-width: 620px;
	margin: 0 auto 34px;
	color: var(--cream-dim);
	font-size: 19px;
}
.rl-hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.rl-hero-note { margin-top: 14px; color: var(--cream-dim); font-size: 14px; }

/* Hero visual: film frame + waveform */
.rl-hero-visual {
	margin: 64px auto 0;
	max-width: 780px;
	border-radius: var(--radius-lg);
	border: 1px solid var(--ink-3);
	background: var(--ink-2);
	padding: 18px 18px 22px;
	box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}
.rl-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 10px;
	background:
		linear-gradient(150deg, #1c2333 0%, #10131b 55%),
		var(--ink);
	overflow: hidden;
}
.rl-frame::after { /* sun + horizon abstraction */
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(120px 120px at 68% 38%, rgba(255, 77, 61, 0.85), rgba(255, 77, 61, 0) 70%),
		linear-gradient(to top, rgba(39, 224, 184, 0.18), transparent 45%);
}
.rl-frame .rl-prompt {
	position: absolute;
	left: 14px;
	bottom: 14px;
	right: 14px;
	background: rgba(11, 13, 18, 0.78);
	border: 1px solid rgba(245, 242, 234, 0.12);
	border-radius: 9px;
	padding: 10px 14px;
	font-size: 14px;
	color: var(--cream);
	text-align: left;
	backdrop-filter: blur(6px);
}
.rl-prompt .cursor { display: inline-block; width: 8px; height: 16px; background: var(--coral); vertical-align: text-bottom; animation: rl-blink 1s steps(1) infinite; }
@keyframes rl-blink { 50% { opacity: 0; } }

.rl-wave { display: flex; align-items: flex-end; gap: 4px; height: 42px; margin-top: 16px; padding: 0 6px; }
.rl-wave span {
	flex: 1;
	background: var(--teal);
	border-radius: 3px 3px 0 0;
	opacity: 0.85;
	animation: rl-bounce 1.4s ease-in-out infinite;
}
.rl-wave span:nth-child(3n)  { animation-delay: .15s; }
.rl-wave span:nth-child(3n+1){ animation-delay: .35s; }
.rl-wave span:nth-child(4n)  { background: var(--coral); }
@keyframes rl-bounce { 0%, 100% { height: 22%; } 50% { height: 96%; } }

/* =====================================================================
   Sections
   ===================================================================== */
.rl-section { padding: 84px 0; }
.rl-section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.rl-section-head p { color: var(--cream-dim); font-size: 18px; }

/* Steps */
.rl-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.rl-step {
	background: var(--ink-2);
	border: 1px solid var(--ink-3);
	border-radius: var(--radius);
	padding: 28px 24px;
}
.rl-step .num {
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--coral);
	font-size: 15px;
	letter-spacing: 0.08em;
}
.rl-step p { color: var(--cream-dim); margin-bottom: 0; font-size: 15.5px; }

/* Tool cards */
.rl-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.rl-tool {
	border-radius: var(--radius-lg);
	padding: 34px 30px;
	border: 1px solid var(--ink-3);
	background: linear-gradient(170deg, var(--ink-2), var(--ink));
	position: relative;
	overflow: hidden;
}
.rl-tool::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; }
.rl-tool.video::before { background: var(--coral); }
.rl-tool.music::before { background: var(--teal); }
.rl-tool .tag { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rl-tool.video .tag { color: var(--coral); }
.rl-tool.music .tag { color: var(--teal); }
.rl-tool ul { color: var(--cream-dim); padding-left: 18px; margin: 14px 0 0; font-size: 15.5px; }
.rl-tool li { margin-bottom: 6px; }

/* Feature grid */
.rl-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.rl-feature { border-top: 1px solid var(--ink-3); padding: 22px 4px 0; }
.rl-feature h3 { font-size: 1.05rem; }
.rl-feature p { color: var(--cream-dim); font-size: 15px; margin: 0; }

/* Light band (pricing lives here so the plugin's light table fits the design) */
.rl-light {
	background: var(--paper);
	color: var(--ink-on-paper);
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.rl-light .rl-section-head p { color: var(--muted-on-paper); }

/* FAQ */
.rl-faq { max-width: 720px; margin: 0 auto; }
.rl-faq details {
	border-bottom: 1px solid var(--line-on-paper);
	padding: 4px 0;
}
.rl-faq summary {
	cursor: pointer;
	font-weight: 600;
	font-family: var(--font-display);
	padding: 16px 0;
	list-style: none;
	position: relative;
	padding-right: 30px;
}
.rl-faq summary::after { content: '+'; position: absolute; right: 4px; color: var(--coral); font-size: 22px; top: 10px; }
.rl-faq details[open] summary::after { content: '–'; }
.rl-faq p { color: var(--muted-on-paper); margin-top: 0; }

/* Final CTA */
.rl-cta { text-align: center; padding: 90px 0 100px; }
.rl-cta h2 { margin-bottom: 12px; }
.rl-cta p { color: var(--cream-dim); margin-bottom: 30px; }

/* =====================================================================
   Footer
   ===================================================================== */
.rl-footer { border-top: 1px solid rgba(245, 242, 234, 0.08); padding: 40px 0; }
.rl-footer-in {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	align-items: center;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 22px;
	color: var(--cream-dim);
	font-size: 14px;
}
.rl-footer a { color: var(--cream-dim); text-decoration: none; margin-left: 18px; }
.rl-footer a:hover { color: var(--cream); }

/* =====================================================================
   Inner pages (page.php): light reading surface
   ===================================================================== */
.rl-page {
	background: var(--paper);
	color: var(--ink-on-paper);
	min-height: 60vh;
	padding: 64px 0 90px;
}
.rl-page .rl-wrap { max-width: 860px; }
.rl-page h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 30px; }

/* =====================================================================
   App template (Studio): calm light workspace, minimal chrome
   ===================================================================== */
.rl-app-body { background: var(--paper); }
.rl-app-main { padding: 26px 0 60px; }
.rl-app-main .rl-wrap { max-width: 1180px; }

/* Make the plugin UI sit naturally on the theme surface */
.rl-app-main .aiw-app { border-color: var(--line-on-paper); box-shadow: 0 18px 50px rgba(22, 24, 31, 0.07); height: calc(100vh - 170px); }
.rl-page .aiw-pricing .aiw-plan, .rl-light .aiw-pricing .aiw-plan { border-radius: var(--radius); }

/* =====================================================================
   Product / key pages (AI video generator, AI music generator, ...)
   ===================================================================== */
.rl-prod-hero { padding: 76px 0 56px; text-align: center; position: relative; overflow: hidden; }
.rl-prod-hero::before {
	content: '';
	position: absolute;
	inset: -30% -20% auto;
	height: 120%;
	background: radial-gradient(40% 50% at 50% 20%, rgba(255, 77, 61, 0.14), transparent 70%);
	pointer-events: none;
}
.rl-prod-hero.music::before { background: radial-gradient(40% 50% at 50% 20%, rgba(39, 224, 184, 0.13), transparent 70%); }
.rl-prod-hero > * { position: relative; }
.rl-prod-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); max-width: 820px; margin-left: auto; margin-right: auto; }
.rl-prod-hero .rl-sub { max-width: 640px; margin: 0 auto 30px; color: var(--cream-dim); font-size: 18.5px; }

/* AEO answer box: the 50-word snippet answer engines lift */
.rl-answer {
	max-width: 720px;
	margin: 0 auto 34px;
	background: var(--ink-2);
	border: 1px solid var(--ink-3);
	border-left: 4px solid var(--coral);
	border-radius: var(--radius);
	padding: 18px 22px;
	text-align: left;
	font-size: 16.5px;
}
.rl-prod-hero.music .rl-answer { border-left-color: var(--teal); }
.rl-answer strong { color: var(--cream); }

/* Spec table */
.rl-spec { width: 100%; border-collapse: collapse; max-width: 720px; margin: 0 auto; }
.rl-spec th, .rl-spec td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--ink-3); font-size: 15.5px; }
.rl-spec th { color: var(--cream-dim); font-weight: 600; width: 42%; }

/* Use-case chips */
.rl-uses { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 760px; margin: 0 auto; }
.rl-uses span {
	border: 1px solid var(--ink-3);
	background: var(--ink-2);
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 14.5px;
	color: var(--cream-dim);
}

/* Dark-surface FAQ variant for product pages */
.rl-faq-dark { max-width: 720px; margin: 0 auto; }
.rl-faq-dark details { border-bottom: 1px solid var(--ink-3); padding: 4px 0; }
.rl-faq-dark summary { cursor: pointer; font-weight: 600; font-family: var(--font-display); padding: 16px 30px 16px 0; list-style: none; position: relative; }
.rl-faq-dark summary::after { content: '+'; position: absolute; right: 4px; top: 10px; color: var(--coral); font-size: 22px; }
.rl-faq-dark details[open] summary::after { content: '–'; }
.rl-faq-dark p { color: var(--cream-dim); margin-top: 0; }

.rl-crosslink { text-align: center; color: var(--cream-dim); font-size: 15.5px; margin-top: 40px; }
.rl-crosslink a { color: var(--cream); }

/* =====================================================================
   Auth screens (login / signup): brand panel + focused form card
   ===================================================================== */
.rl-auth-body { background: var(--paper); }
.rl-auth {
	display: grid;
	grid-template-columns: minmax(380px, 46%) 1fr;
	min-height: 100vh;
}
.rl-auth-brand {
	background:
		radial-gradient(60% 45% at 20% 12%, rgba(255, 77, 61, 0.16), transparent 70%),
		radial-gradient(50% 40% at 85% 80%, rgba(39, 224, 184, 0.12), transparent 70%),
		var(--ink);
	color: var(--cream);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 34px 44px;
}
.rl-auth-brand .rl-logo { color: var(--cream); }
.rl-auth-brand-mid { max-width: 420px; margin: auto 0; }
.rl-auth-brand-mid h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.rl-auth-brand-mid > p { color: var(--cream-dim); margin-bottom: 26px; }
.rl-auth-frame {
	aspect-ratio: 16 / 9;
	border-radius: 12px;
	border: 1px solid var(--ink-3);
	background:
		radial-gradient(90px 90px at 66% 36%, rgba(255, 77, 61, 0.8), rgba(255, 77, 61, 0) 70%),
		linear-gradient(to top, rgba(39, 224, 184, 0.16), transparent 45%),
		linear-gradient(150deg, #1c2333 0%, #10131b 55%);
	position: relative;
	overflow: hidden;
}
.rl-auth-prompt {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	background: rgba(11, 13, 18, 0.78);
	border: 1px solid rgba(245, 242, 234, 0.12);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
}
.rl-auth-prompt .cursor { display: inline-block; width: 7px; height: 14px; background: var(--coral); vertical-align: text-bottom; animation: rl-blink 1s steps(1) infinite; }
.rl-auth-wave { height: 30px; margin-top: 14px; }
.rl-auth-foot { color: var(--cream-dim); font-size: 13.5px; margin: 0; }

.rl-auth-main {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	background: var(--paper);
	color: var(--ink-on-paper);
}
.rl-auth-card { width: 100%; max-width: 400px; }
.rl-auth-card h1 { font-size: 1.85rem; margin-bottom: 6px; }
.rl-auth-card .rl-auth-lead { color: var(--muted-on-paper); margin: 0 0 26px; font-size: 15.5px; }

.rl-auth-card form p { margin: 0 0 16px; }
.rl-auth-card label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink-on-paper); }
.rl-auth-card input[type='text'],
.rl-auth-card input[type='email'],
.rl-auth-card input[type='password'] {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--line-on-paper);
	border-radius: 10px;
	background: var(--paper-2);
	font: inherit;
	color: var(--ink-on-paper);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.rl-auth-card input:focus {
	outline: none;
	border-color: var(--coral);
	box-shadow: 0 0 0 3px rgba(255, 77, 61, 0.15);
}
.rl-auth-card .rl-btn, .rl-auth-card .aiw-btn, .rl-auth-card input[type='submit'] {
	display: block;
	width: 100%;
	background: var(--coral);
	color: #fff !important;
	border: 0;
	border-radius: 10px;
	padding: 13px 18px;
	font-weight: 700;
	font-family: var(--font-display);
	font-size: 16px;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: background .15s ease;
}
.rl-auth-card .rl-btn:hover, .rl-auth-card .aiw-btn:hover, .rl-auth-card input[type='submit']:hover { background: var(--coral-deep); }
.rl-auth-card .login-remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-on-paper); }
.rl-auth-card .login-remember label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; color: var(--muted-on-paper); }

.rl-auth-alt { margin-top: 22px; text-align: center; font-size: 14.5px; color: var(--muted-on-paper); }
.rl-auth-alt a { color: var(--coral-deep); font-weight: 600; text-decoration: none; }
.rl-auth-error {
	background: #fef2f2;
	color: #b32d2e;
	border-radius: 10px;
	padding: 11px 14px;
	font-size: 14.5px;
	margin-bottom: 18px;
}
.rl-auth-fineprint { color: var(--muted-on-paper); font-size: 13px; text-align: center; margin-top: 14px; }

/* Neutralize the plugin's built-in inline form styles inside the card */
.rl-auth-card .aiw-register { max-width: none; }
.rl-auth-card .aiw-gate { border: 0; padding: 20px 0; text-align: left; }

@media (max-width: 860px) {
	.rl-auth { grid-template-columns: 1fr; }
	.rl-auth-brand { display: none; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 760px) {
	.rl-nav a:not(.rl-btn) { display: none; }
	.rl-section { padding: 60px 0; }
	.rl-hero { padding: 64px 0 50px; }
}
