/*
Theme Name: PJ JR Forms
Theme URI: https://pridejapan.net/jr/form
Author: OpenAI Codex
Author URI: https://openai.com/
Description: Dedicated theme for PRIDEJAPAN junior tournament forms powered by Contact Form 7.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: pj-jr-forms
*/

:root {
	--pj-navy: #102b5c;
	--pj-navy-dark: #08162f;
	--pj-red: #d62828;
	--pj-red-dark: #b51b1b;
	--pj-bg: #eef3f8;
	--pj-surface: #ffffff;
	--pj-surface-soft: #f7f9fc;
	--pj-border: #d5deea;
	--pj-text: #1d2a3a;
	--pj-muted: #65748a;
	--pj-shadow: 0 20px 50px rgba(16, 43, 92, 0.12);
	--pj-radius-lg: 24px;
	--pj-radius-md: 14px;
	--pj-radius-sm: 10px;
	--pj-container: 1120px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background:
		linear-gradient(180deg, rgba(16, 43, 92, 0.08), rgba(16, 43, 92, 0) 260px),
		linear-gradient(135deg, #f6f9fd 0%, #edf3f8 55%, #f8fbfd 100%);
	color: var(--pj-text);
	font-family: "Hiragino Sans", "Yu Gothic", "Yu Gothic Medium", Meiryo, sans-serif;
	font-size: 16px;
	line-height: 1.8;
}

a {
	color: var(--pj-navy);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

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

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.pj-site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.pj-header {
	position: relative;
	padding: 14px 16px 18px;
	background:
		radial-gradient(circle at top right, rgba(214, 40, 40, 0.2), transparent 28%),
		linear-gradient(135deg, var(--pj-navy-dark), var(--pj-navy));
	color: #fff;
}

.pj-header__inner,
.pj-main,
.pj-footer__inner {
	width: min(calc(100% - 32px), var(--pj-container));
	margin: 0 auto;
}

.pj-header__branding {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 0;
}

.pj-brand-wrap {
	display: flex;
	align-items: center;
	gap: 20px;
	min-width: 0;
}

.pj-brand {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	color: #fff;
}

.pj-brand:hover {
	text-decoration: none;
}

.pj-brand__eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	opacity: 0.72;
}

.pj-brand__title {
	font-size: clamp(24px, 4vw, 34px);
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1.2;
}

.pj-brand__sub {
	font-size: 13px;
	letter-spacing: 0.08em;
	opacity: 0.82;
}

.pj-brand-logo {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: clamp(92px, 11vw, 138px);
	aspect-ratio: 1;
	padding: 10px;
	border-radius: 24px;
	background:
		radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 55%, transparent 70%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow:
		0 18px 38px rgba(0, 0, 0, 0.26),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(10px);
	overflow: hidden;
}

.pj-brand-logo::after {
	content: "";
	position: absolute;
	inset: auto -18% -38% 22%;
	height: 58%;
	background: radial-gradient(circle, rgba(214, 40, 40, 0.34), transparent 72%);
	pointer-events: none;
}

.pj-brand-logo .pj-brand-logo__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.pj-brand-logo .custom-logo {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.pj-header__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(8px);
}

.pj-header__link:hover {
	text-decoration: none;
	background: rgba(255, 255, 255, 0.14);
}

.pj-hero {
	display: block;
}

.pj-hero__copy h1 {
	margin: 0 0 8px;
	font-size: clamp(34px, 6vw, 56px);
	line-height: 1.02;
	letter-spacing: 0.03em;
}

.pj-hero__copy p {
	margin: 0;
	max-width: 36rem;
	color: rgba(255, 255, 255, 0.86);
}

.pj-main {
	flex: 1;
	margin-top: 28px;
	padding-bottom: 72px;
}

.pj-shell {
	display: block;
}

.pj-content-card,
.pj-side-card {
	background: var(--pj-surface);
	border: 1px solid rgba(213, 222, 234, 0.92);
	box-shadow: var(--pj-shadow);
}

.pj-content-card {
	padding: clamp(22px, 4vw, 40px);
	border-radius: 20px;
}

.pj-entry-header {
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--pj-border);
}

.pj-entry-header__eyebrow {
	display: inline-block;
	margin-bottom: 10px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(214, 40, 40, 0.08);
	color: var(--pj-red);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.pj-entry-title {
	margin: 0;
	font-size: clamp(30px, 4.8vw, 48px);
	line-height: 1.08;
	letter-spacing: 0.03em;
	color: var(--pj-navy-dark);
}

.pj-entry-content > *:first-child {
	margin-top: 0;
}

.pj-entry-content > *:last-child {
	margin-bottom: 0;
}

.pj-entry-content h2,
.pj-entry-content h3,
.pj-entry-content h4 {
	margin-top: 1.8em;
	margin-bottom: 0.7em;
	line-height: 1.3;
	color: var(--pj-navy-dark);
}

.pj-entry-content p,
.pj-entry-content ul,
.pj-entry-content ol {
	margin-top: 0;
	margin-bottom: 1.2em;
}

.pj-entry-content ul,
.pj-entry-content ol {
	padding-left: 1.3em;
}

.pj-entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5em;
	background: var(--pj-surface-soft);
}

.pj-entry-content th,
.pj-entry-content td {
	padding: 12px 14px;
	border: 1px solid var(--pj-border);
	text-align: left;
}

.pj-entry-content blockquote {
	margin: 0 0 1.4em;
	padding: 18px 20px;
	border-left: 4px solid var(--pj-red);
	background: #fbfcfe;
	color: var(--pj-muted);
}

.pj-footer {
	padding: 28px 16px 36px;
	background: transparent;
}

.pj-footer__inner {
	padding-top: 18px;
	border-top: 1px solid rgba(16, 43, 92, 0.12);
	color: var(--pj-muted);
	font-size: 13px;
}

.pj-footer__inner p {
	margin: 0;
}

.pj-thanks-card {
	max-width: 860px;
	margin: 0 auto;
}

.pj-thanks-head {
	margin-bottom: 24px;
}

.pj-thanks-badge {
	display: inline-block;
	margin-bottom: 14px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(214, 40, 40, 0.08);
	color: var(--pj-red);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.pj-thanks-content {
	max-width: 52rem;
}

.pj-thanks-actions {
	margin: 32px 0 0;
}

.pj-thanks-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--pj-red), var(--pj-red-dark));
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	box-shadow: 0 14px 28px rgba(214, 40, 40, 0.22);
}

.pj-thanks-button:hover {
	color: #fff;
	text-decoration: none;
}

/* Contact Form 7 common styles */
.pj-cf7 {
	max-width: none;
	margin: 0;
	padding: 30px;
	background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
	border: 1px solid var(--pj-border);
	border-top: 6px solid var(--pj-red);
	border-radius: 18px;
	box-shadow: 0 12px 28px rgba(16, 43, 92, 0.07);
}

.pj-cf7 * {
	box-sizing: border-box;
}

.pj-cf7 .pj-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 24px;
}

.pj-cf7 .pj-form-item {
	margin-bottom: 0;
}

.pj-cf7 .pj-form-item.is-full {
	grid-column: 1 / -1;
}

.pj-cf7 label {
	display: block;
	margin-bottom: 8px;
	color: var(--pj-navy-dark);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
}

.pj-cf7 .pj-required {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--pj-red);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	vertical-align: middle;
}

.pj-cf7 input[type="text"],
.pj-cf7 input[type="email"],
.pj-cf7 input[type="tel"],
.pj-cf7 input[type="number"],
.pj-cf7 input[type="date"],
.pj-cf7 select,
.pj-cf7 textarea {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--pj-border);
	border-radius: var(--pj-radius-sm);
	background: var(--pj-surface-soft);
	color: var(--pj-text);
	font: inherit;
	line-height: 1.6;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.pj-cf7 textarea {
	min-height: 180px;
	resize: vertical;
}

.pj-cf7 input::placeholder,
.pj-cf7 textarea::placeholder {
	color: #8694a8;
}

.pj-cf7 input:focus,
.pj-cf7 select:focus,
.pj-cf7 textarea:focus {
	outline: none;
	border-color: var(--pj-navy);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(16, 43, 92, 0.12);
}

.pj-cf7 .wpcf7-not-valid {
	border-color: var(--pj-red);
	background: #fff3f3;
}

.pj-cf7 .wpcf7-not-valid-tip {
	margin-top: 8px;
	color: var(--pj-red);
	font-size: 13px;
	font-weight: 700;
}

.pj-cf7 .wpcf7-response-output {
	margin: 24px 0 0;
	padding: 14px 16px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.7;
}

.pj-cf7 .wpcf7 form.sent .wpcf7-response-output {
	border: 1px solid #b8d7c3;
	background: #edf8f1;
	color: #1d5f36;
}

.pj-cf7 .wpcf7 form.invalid .wpcf7-response-output,
.pj-cf7 .wpcf7 form.failed .wpcf7-response-output,
.pj-cf7 .wpcf7 form.aborted .wpcf7-response-output {
	border: 1px solid #e8b2b2;
	background: #fff3f3;
	color: #9f1f1f;
}

.pj-cf7 .wpcf7-list-item {
	margin: 0;
}

.pj-cf7 .wpcf7-acceptance label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 0;
	color: var(--pj-text);
	font-weight: 500;
}

.pj-cf7 .wpcf7-acceptance input[type="checkbox"] {
	margin-top: 4px;
}

.pj-cf7 .pj-note {
	margin-top: 8px;
	color: var(--pj-muted);
	font-size: 13px;
	line-height: 1.7;
}

.pj-cf7 .pj-submit-wrap {
	margin-top: 28px;
	text-align: center;
}

.pj-cf7 .pj-player-block {
	grid-column: 1 / -1;
	padding: 20px;
	border: 1px solid var(--pj-border);
	border-radius: 16px;
	background: #fff;
}

.pj-cf7 .pj-player-block.is-hidden {
	display: none;
}

.pj-cf7 .pj-player-block + .pj-player-block {
	margin-top: 4px;
}

.pj-cf7 .pj-player-block__title {
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--pj-border);
	color: var(--pj-navy-dark);
	font-size: 18px;
	font-weight: 800;
	line-height: 1.4;
}

.pj-cf7 .pj-add-wrap {
	margin-top: 22px;
	text-align: center;
}

.pj-cf7 .pj-add-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 20px;
	border: 1px solid var(--pj-navy);
	border-radius: 999px;
	background: #fff;
	color: var(--pj-navy);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pj-cf7 .pj-add-button:hover {
	background: var(--pj-navy);
	color: #fff;
}

.pj-cf7 input[type="submit"] {
	min-width: 260px;
	padding: 16px 28px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--pj-red), var(--pj-red-dark));
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
	box-shadow: 0 14px 28px rgba(214, 40, 40, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.pj-cf7 input[type="submit"]:hover {
	transform: translateY(-1px);
	box-shadow: 0 18px 34px rgba(214, 40, 40, 0.26);
}

.pj-cf7 input[type="submit"]:active {
	transform: translateY(0);
}

.pj-cf7 .wpcf7-spinner {
	display: block;
	margin: 14px auto 0;
}

@media (max-width: 1023px) {
	.pj-shell {
		display: block;
	}
}

@media (max-width: 767px) {
	.pj-header {
		padding: 12px 12px 16px;
	}

	.pj-header__inner,
	.pj-main,
	.pj-footer__inner {
		width: min(calc(100% - 24px), var(--pj-container));
	}

	.pj-header__branding {
		flex-direction: column;
		align-items: flex-start;
		margin-bottom: 16px;
	}

	.pj-brand-wrap {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.pj-brand-logo {
		width: 104px;
		border-radius: 20px;
	}

	.pj-content-card,
	.pj-cf7 {
		border-radius: 18px;
	}

	.pj-content-card {
		padding: 20px 16px;
	}

	.pj-cf7 {
		padding: 20px 16px;
	}

	.pj-cf7 .pj-form-grid {
		grid-template-columns: 1fr;
		gap: 18px 0;
	}

	.pj-cf7 input[type="submit"] {
		width: 100%;
		min-width: 0;
	}
}
