/**
 * Fanclub shared components.
 *
 * Anything reused across sections (buttons, arrow links) lives here.
 * Section stylesheets may only position a component (grid-area, margin, width),
 * never restyle it. Loaded after style.flat.css, before section/compat CSS.
 *
 * Button:  <a class="c-btn c-btn--{red|white|outline} [c-btn--lg] [c-btn--block]">
 *            <span class="c-btn__label">Label</span><i class="c-btn__icon" aria-hidden="true">↗</i>
 *          </a>
 * Link:    <a class="text-link">Label <span aria-hidden="true">↗</span></a>
 */

/* ---------- Button ---------- */
.c-btn {
	--btn-bg: var(--red);
	--btn-fg: #fff;
	--btn-icon-bg: #ffffff25;
	--btn-icon-fg: currentColor;
	--btn-icon-size: 32px;
	--btn-focus: #2895cf;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	box-sizing: border-box;
	max-width: 100%;
	min-height: 55px;
	padding: 12px 12px 12px 24px;
	border: 0;
	border-radius: 60px;
	background: var(--btn-bg);
	color: var(--btn-fg);
	font: inherit;
	font-size: .875rem;
	font-weight: 700;
	line-height: 1.4;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	position: relative;
	transition: background .3s, box-shadow .3s, transform .45s var(--ease);
}

.c-btn__label {
	min-width: 0;
	overflow-wrap: anywhere;
}

.c-btn__icon {
	flex-shrink: 0;
	display: grid;
	place-items: center;
	width: var(--btn-icon-size);
	height: var(--btn-icon-size);
	border-radius: 50%;
	background: var(--btn-icon-bg);
	color: var(--btn-icon-fg);
	font-size: 1.125rem;
	font-style: normal;
	font-weight: 400;
	line-height: 1;
	transition: transform .35s var(--ease), background .3s;
}

.c-btn:hover .c-btn__icon,
.c-btn:focus-visible .c-btn__icon {
	transform: translate(3px, -3px);
}

.c-btn:focus-visible {
	outline: 3px solid var(--btn-focus);
	outline-offset: 4px;
}

/* Variants */
.c-btn--red:hover {
	background: #d90000;
	color: #fff;
	box-shadow: 0 8px 25px #ff00002b;
}

.c-btn--white {
	--btn-bg: #fff;
	--btn-fg: var(--navy);
	--btn-icon-bg: var(--navy);
	--btn-icon-fg: #fff;
	--btn-focus: #fff;
	box-shadow: 0 12px 32px #00000035;
}

.c-btn--white:hover {
	background: #fff;
	color: var(--navy);
	transform: translateY(-4px);
	box-shadow: 0 22px 44px #00000042;
}

.c-btn--white:hover .c-btn__icon,
.c-btn--white:focus-visible .c-btn__icon {
	background: var(--red);
}

.c-btn--outline {
	--btn-bg: #fff;
	--btn-fg: var(--navy);
	--btn-icon-bg: #0b006412;
	box-shadow: inset 0 0 0 1px var(--navy);
}

.c-btn--outline:hover {
	background: #f2f0f8;
	color: var(--navy);
}

/* Sizes / layout modifiers */
.c-btn--lg {
	--btn-icon-size: 50px;
	min-height: 68px;
	padding: 9px 9px 9px 30px;
	gap: 36px;
	font-size: clamp(1.2rem, 2.1vw, 1.45rem);
	font-weight: 900;
	letter-spacing: -.02em;
	line-height: 1.15;
}

.c-btn--lg .c-btn__icon {
	font-size: 1.45rem;
}

.c-btn--block {
	width: 100%;
}

/* ---------- Arrow text link ---------- */
.text-link {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 60px;
	margin-top: 19px;
	padding: 10px 0;
	border-bottom: 1px solid var(--navy);
	color: var(--navy);
	font-size: .75rem;
	font-weight: 700;
}

.text-link span {
	font-size: 1.3rem;
	transition: transform .3s;
}

.text-link:hover span {
	transform: translate(3px, -3px);
}

/* ---------- CF7 submit (same look as .c-btn--red) ---------- */
.bells-fanclub .wpcf7-submit {
	border: 0;
	border-radius: 60px;
	background: var(--red);
	color: #fff;
	font-weight: 700;
	transition: background .3s, box-shadow .3s;
}

.bells-fanclub .wpcf7-submit:hover:not(:disabled) {
	background: #d90000;
	box-shadow: 0 8px 25px #ff00002b;
}

/* ---------- Graphic (image-free visual) ----------
 * <?php get_template_part( 'template-parts/fanclub/graphic', null, array( 'tone' => 'navy', 'word' => 'JOY.', 'ball' => true ) ); ?>
 * Fills its positioned parent (position:absolute; inset:0).
 */
.c-graphic {
	--g-bg: radial-gradient(circle at 78% 18%, #2b1fb4 0, transparent 55%), linear-gradient(155deg, #150a7c 0%, #0b0064 45%, #08042b 100%);
	--g-line: #ffffff3d;
	--g-net: var(--red);
	--g-stroke: #ffffff6b;
	--g-ball: #fff;
	--g-ball-fill: transparent;
	position: absolute;
	inset: 0;
	overflow: hidden;
	isolation: isolate;
	container-type: size;
	background: var(--g-bg);
	color: #fff;
	pointer-events: none;
}

.c-graphic::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: repeating-linear-gradient(115deg, #ffffff07 0 2px, transparent 2px 16px);
}

.c-graphic--night {
	--g-bg: radial-gradient(circle at 70% 30%, #221889 0, transparent 60%), #08042b;
	--g-line: #ffffff33;
}

.c-graphic--red {
	--g-bg: radial-gradient(circle at 80% 15%, #ff5050 0, transparent 50%), linear-gradient(160deg, #ff1414 0%, #d10000 55%, #8f0000 100%);
	--g-line: #ffffff59;
	--g-net: #fff;
	--g-stroke: #ffffff8c;
}

.c-graphic--gold {
	--g-bg: radial-gradient(circle at 75% 25%, #2c2270 0, transparent 58%), linear-gradient(155deg, #17104f 0%, #08042b 70%);
	--g-line: #e6c99533;
	--g-net: #e6c995;
	--g-stroke: #e6c99580;
	--g-ball: #e6c995;
}

/* Court: perspective rectangle, net (center) and attack lines */
.c-graphic__court {
	position: absolute;
	left: 52%;
	top: 60%;
	width: 120cqw;
	aspect-ratio: 2 / 1;
	border: 2px solid var(--g-line);
	translate: -50% -50%;
	transform: perspective(900px) rotateX(58deg) rotateZ(-20deg);
}

.c-graphic__court::before {
	content: "";
	position: absolute;
	top: -8%;
	bottom: -8%;
	left: 50%;
	width: 3px;
	translate: -50% 0;
	background: var(--g-net);
	opacity: .75;
}

.c-graphic__court::after {
	content: "";
	position: absolute;
	inset: 0 33.333%;
	border-inline: 1px solid var(--g-line);
}

/* Volleyball line art */
.c-graphic__ball {
	position: absolute;
	right: 6cqw;
	top: 8cqh;
	width: min(44cqw, 64cqh);
	height: auto;
	color: var(--g-ball);
	fill: none;
	stroke: currentColor;
	stroke-width: .45;
	stroke-linecap: round;
	opacity: .9;
	animation: c-graphic-spin 60s linear infinite;
}

.c-graphic__ball circle {
	fill: var(--g-ball-fill);
}

/* Big outlined word */
.c-graphic__word {
	position: absolute;
	left: 6cqw;
	bottom: -.08em;
	font-size: min(38cqw, 66cqh);
	font-weight: 900;
	letter-spacing: -.06em;
	line-height: .8;
	white-space: nowrap;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--g-stroke);
}

@keyframes c-graphic-spin {
	to {
		rotate: 360deg;
	}
}

@media (prefers-reduced-motion: reduce) {
	.c-graphic__ball {
		animation: none;
	}
}

@media (max-width: 767px) {
	.c-btn {
		font-size: .8125rem;
	}

	.c-btn--lg {
		min-height: 64px;
		padding-left: 26px;
		gap: 20px;
		font-size: 1.3rem;
	}

	.text-link {
		gap: 50px;
		margin-top: 15px;
		font-size: .6875rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.c-btn,
	.c-btn__icon,
	.text-link span {
		transition: none !important;
	}
}
