/*
 * IncubeSocial — wp-login.php reskin
 * Split-screen sign-in: brand form panel (left) + animated content carousel
 * (right). WordPress's real auth is untouched — this only restyles the
 * #login markup and injects a decorative carousel via login_message.
 *
 * Feedbird-inspired layout, but built from the real inCube identity:
 * navy #0D132B, purple #6C3AED, the pink->purple->blue signature gradient,
 * Sora + Inter. No blue-clone. Consumes design-tokens.css (enqueued first).
 *
 * Carousel content = brand post-cards + ONE unlabeled Mauve tile (mirrors
 * the home hero). No real identifiable faces until a written-permission
 * photo is supplied — same policy as page-home.php creators grid.
 */

/* ---------------------------------------------------------------------
   0. Reset WP's default centered-form chrome
   ------------------------------------------------------------------- */
body.login {
	margin: 0;
	min-height: 100vh;
	background: var(--color-navy-dark, #0D132B);
	font-family: var(--font-body, "Inter", sans-serif);
	color: #0D132B;
	/* Kill WP's default top padding that centers the little form. */
	padding: 0 !important;
	overflow-x: hidden;
}

/* WP wraps everything in #login (the narrow 320px column). We break it out
   into the LEFT half of a two-panel grid. The carousel panel is injected as
   a sibling (.incube-login-stage) and pinned to the right via fixed
   positioning, so we don't fight WP's DOM order. */
#login {
	width: min(440px, 100%) !important;
	max-width: 440px !important;
	margin: 0 !important;
	padding: clamp(2rem, 5vh, 4rem) clamp(1.5rem, 4vw, 3.5rem) !important;
	min-height: 100vh;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	position: relative;
	z-index: 2;
	background: #ffffff;
}

/* Thin gradient seam between form panel and stage. */
#login::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 4px;
	height: 100%;
	background: var(--gradient-signature,
		linear-gradient(180deg, #FF4D8D, #9A45E8, #00B4FF));
}

/* ---------------------------------------------------------------------
   1. Brand logo (the h1 > a WP renders at the top of #login)
   ------------------------------------------------------------------- */
#login h1,
.login h1 {
	margin: 0 0 0.4rem;
	text-align: left;
}

#login h1 a,
.login h1 a {
	background-image: url("media/brand/IncubeSocial_Final_Logo_Light.svg") !important;
	background-size: contain !important;
	background-position: left center !important;
	background-repeat: no-repeat !important;
	width: 190px !important;
	height: 46px !important;
	margin: 0 !important;
	text-indent: -9999px;
	overflow: hidden;
}

/* Welcome copy injected above the form via login_message. */
.incube-login-welcome {
	margin: 0 0 1.6rem;
}

.incube-login-welcome__title {
	font-family: var(--font-heading, "Sora", sans-serif);
	font-weight: 800;
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--color-navy-dark, #0D132B);
	margin: 0 0 0.5rem;
}

.incube-login-welcome__sub {
	font-size: 0.95rem;
	line-height: 1.5;
	color: #5b6478;
	margin: 0;
}

/* ---------------------------------------------------------------------
   2. The form itself (WP's #loginform)
   ------------------------------------------------------------------- */
.login form {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	font-weight: 500;
}

.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
	background: #f6f7fb !important;
	border: 1.5px solid #e4e7f0 !important;
	border-radius: 12px !important;
	padding: 0.85rem 1rem !important;
	font-size: 1rem !important;
	color: #0D132B !important;
	box-shadow: none !important;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
	margin: 0 0 1rem !important;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
	background: #ffffff !important;
	border-color: var(--color-purple-primary, #6C3AED) !important;
	box-shadow: 0 0 0 4px rgba(108, 58, 237, 0.12) !important;
	outline: none !important;
}

.login label {
	font-size: 0.85rem !important;
	font-weight: 600 !important;
	color: #3a4257 !important;
	line-height: 1.6;
}

/* Submit button — signature gradient, matches site CTAs. */
.login .button-primary,
.login #wp-submit {
	width: 100% !important;
	background: var(--gradient-signature,
		linear-gradient(90deg, #FF4D8D, #9A45E8, #00B4FF)) !important;
	background-size: 160% 100% !important;
	background-position: 0% 50% !important;
	border: 0 !important;
	border-radius: 12px !important;
	padding: 0.9rem 1rem !important;
	height: auto !important;
	font-family: var(--font-heading, "Sora", sans-serif) !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
	color: #ffffff !important;
	text-shadow: none !important;
	box-shadow: 0 8px 20px -6px rgba(108, 58, 237, 0.5) !important;
	cursor: pointer;
	transition: background-position 0.5s ease, transform 0.12s ease, box-shadow 0.2s ease;
	margin-top: 0.5rem !important;
}

.login .button-primary:hover,
.login #wp-submit:hover {
	background-position: 100% 50% !important;
	box-shadow: 0 12px 26px -6px rgba(108, 58, 237, 0.6) !important;
}

.login .button-primary:active,
.login #wp-submit:active {
	transform: translateY(1px);
}

/* "Remember Me" row */
.login .forgetmenot {
	margin: 0.2rem 0 1.1rem !important;
	font-weight: 500;
}

.login .forgetmenot label {
	font-weight: 500 !important;
	color: #5b6478 !important;
}

/* Links under the form (Lost password / Back to site) */
.login #nav,
.login #backtoblog {
	text-align: left !important;
	padding: 0 !important;
	margin: 1.1rem 0 0 !important;
}

.login #nav a,
.login #backtoblog a {
	color: #6b7488 !important;
	font-size: 0.85rem !important;
	transition: color 0.15s ease;
}

.login #nav a:hover,
.login #backtoblog a:hover {
	color: var(--color-purple-primary, #6C3AED) !important;
}

/* Messages / errors — brand them instead of the default yellow WP box. */
.login .message,
.login #login_error {
	border-radius: 12px !important;
	border: 0 !important;
	border-left: 4px solid var(--color-purple-primary, #6C3AED) !important;
	background: #f4f0ff !important;
	box-shadow: 0 6px 16px -8px rgba(13, 19, 43, 0.25) !important;
	font-size: 0.9rem !important;
	color: #2c2350 !important;
}

.login #login_error {
	border-left-color: var(--color-pink-accent, #FF4D8D) !important;
	background: #fff0f5 !important;
	color: #7a1436 !important;
}

/* ---------------------------------------------------------------------
   3. The animated carousel stage (right panel)
   Injected after the form via login_message; pinned right with fixed pos.
   ------------------------------------------------------------------- */
.incube-login-stage {
	position: fixed;
	top: 0;
	right: 0;
	width: calc(100% - 440px);
	height: 100vh;
	background:
		radial-gradient(1200px 600px at 70% 10%, rgba(154, 69, 232, 0.35), transparent 60%),
		radial-gradient(900px 500px at 90% 90%, rgba(0, 180, 255, 0.28), transparent 60%),
		var(--color-navy-dark, #0D132B);
	overflow: hidden;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

/* Soft grain/vignette so the columns never touch the raw edge. */
.incube-login-stage::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(13, 19, 43, 0.55) 0%, transparent 22%, transparent 62%, rgba(13, 19, 43, 0.92) 100%);
	z-index: 3;
	pointer-events: none;
}

/* The two drifting columns of cards. */
.incube-carousel {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.1rem;
	padding: 1.1rem;
	transform: rotate(-4deg) scale(1.18);
	transform-origin: center;
	z-index: 2;
}

.incube-carousel__col {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	will-change: transform;
	animation: incube-drift-up 34s linear infinite;
}

.incube-carousel__col--slow {
	animation-duration: 46s;
}

.incube-carousel__col--mid {
	animation-duration: 40s;
	animation-direction: reverse;
}

@keyframes incube-drift-up {
	from { transform: translateY(0); }
	to   { transform: translateY(-50%); }
}

/* Individual post card */
.incube-card {
	border-radius: 18px;
	overflow: hidden;
	background: #141a35;
	box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.06);
	aspect-ratio: 4 / 5;
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
}

/* Mini post header (avatar dot + handle bar) */
.incube-card__head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 0.7rem;
}

.incube-card__avatar {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--gradient-signature,
		linear-gradient(135deg, #FF4D8D, #9A45E8, #00B4FF));
	flex: 0 0 auto;
}

.incube-card__handle {
	height: 7px;
	width: 54px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.22);
}

/* The visual body of the post — a generated brand gradient/graphic. */
.incube-card__media {
	flex: 1;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.incube-card__media-label {
	font-family: var(--font-heading, "Sora", sans-serif);
	font-weight: 800;
	font-size: 1.35rem;
	letter-spacing: -0.02em;
	color: rgba(255, 255, 255, 0.95);
	text-align: center;
	line-height: 1.05;
	padding: 0.5rem;
	position: relative;
	z-index: 2;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Post footer action row (little icon dots) */
.incube-card__actions {
	display: flex;
	gap: 0.5rem;
	padding: 0.55rem 0.7rem;
	background: rgba(0, 0, 0, 0.15);
}

.incube-card__actions span {
	width: 14px;
	height: 14px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.25);
}

/* Per-card gradient variants (brand palette only, no orange flooding) */
.incube-card--g1 .incube-card__media { background: linear-gradient(140deg, #6C3AED, #9A45E8); }
.incube-card--g2 .incube-card__media { background: linear-gradient(140deg, #FF4D8D, #9A45E8); }
.incube-card--g3 .incube-card__media { background: linear-gradient(140deg, #00B4FF, #6C3AED); }
.incube-card--g4 .incube-card__media { background: linear-gradient(140deg, #0D132B, #6C3AED); }
.incube-card--g5 .incube-card__media { background: linear-gradient(140deg, #9A45E8, #00B4FF); }
.incube-card--g6 .incube-card__media { background: linear-gradient(140deg, #FF4D8D, #6C3AED 60%, #00B4FF); }

/* Decorative dot-grid texture inside media */
.incube-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.5px, transparent 1.6px);
	background-size: 16px 16px;
	opacity: 0.5;
	mix-blend-mode: overlay;
	z-index: 1;
}

/* --- Mauve tile: the one "real creator" slot (mirrors home hero) ---
   Unlabeled gradient placeholder until a permission-cleared photo exists.
   To drop her photo in later, set:
     .incube-card--mauve .incube-card__media {
        background: url(media/brand/mauve.jpg) center/cover;
     }
   and remove .incube-card__media-label text server-side. */
.incube-card--mauve {
	border: 1.5px solid rgba(255, 77, 141, 0.6);
	box-shadow: 0 0 0 1px rgba(255, 77, 141, 0.2), 0 20px 44px -16px rgba(255, 77, 141, 0.4);
}

.incube-card--mauve .incube-card__media {
	background: linear-gradient(150deg, #FF4D8D, #6C3AED);
}

.incube-card--mauve .incube-card__badge {
	position: absolute;
	top: 0.55rem;
	left: 0.55rem;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: rgba(13, 19, 43, 0.72);
	backdrop-filter: blur(6px);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.28rem 0.55rem;
	border-radius: 999px;
}

.incube-card--mauve .incube-card__rec {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #FF4D8D;
	box-shadow: 0 0 0 0 rgba(255, 77, 141, 0.7);
	animation: incube-rec-pulse 1.6s ease-out infinite;
}

@keyframes incube-rec-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(255, 77, 141, 0.7); }
	100% { box-shadow: 0 0 0 8px rgba(255, 77, 141, 0); }
}

/* ---------------------------------------------------------------------
   4. Testimonial strip pinned to the bottom of the stage (Feedbird cue)
   ------------------------------------------------------------------- */
.incube-stage-quote {
	position: relative;
	z-index: 4;
	margin: 0;
	padding: 1.6rem clamp(1.5rem, 3vw, 3rem) 2rem;
	max-width: 620px;
	color: #fff;
}

.incube-stage-quote__text {
	font-family: var(--font-heading, "Sora", sans-serif);
	font-weight: 600;
	font-size: clamp(1.1rem, 1.7vw, 1.5rem);
	line-height: 1.35;
	letter-spacing: -0.01em;
	margin: 0 0 0.9rem;
}

.incube-stage-quote__by {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.8);
}

/* Real client photo (Adam 2026-07-16) — was a flat gradient circle, which read
   as a placeholder next to a real testimonial. The signature gradient survives
   as a thin ring so the avatar still carries the brand without the photo
   fighting it. Sized 34px on screen, 96px source for retina. */
.incube-stage-quote__by-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
	display: block;
	/* gradient ring: 2px of brand around the photo */
	padding: 2px;
	background: var(--gradient-signature,
		linear-gradient(135deg, #FF4D8D, #9A45E8, #00B4FF));
	box-shadow: 0 2px 8px rgba(13, 19, 43, 0.35);
}

/* Legacy gradient-dot rule kept as a fallback for any markup not yet migrated. */
.incube-stage-quote__by-dot {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--gradient-signature,
		linear-gradient(135deg, #FF4D8D, #9A45E8, #00B4FF));
	flex: 0 0 auto;
}

.incube-stage-quote__stars {
	margin-left: auto;
	color: #FF8A00;
	letter-spacing: 2px;
	font-size: 0.95rem;
}

/* ---------------------------------------------------------------------
   5. Responsive — collapse to single column, hide the carousel
   ------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.incube-login-stage { display: none; }
	#login {
		width: 100% !important;
		max-width: 460px !important;
		margin: 0 auto !important;
		background: transparent;
	}
	#login::after { display: none; }
	body.login {
		background:
			radial-gradient(900px 500px at 80% 0%, rgba(154, 69, 232, 0.28), transparent 60%),
			var(--color-navy-dark, #0D132B);
		display: flex;
		align-items: center;
	}
	/* On the navy backdrop the form needs its own white card. */
	#login {
		background: #fff;
		border-radius: 24px;
		box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
		min-height: auto;
		margin: 2rem auto !important;
	}
}

@media (max-width: 480px) {
	#login {
		border-radius: 0;
		min-height: 100vh;
		box-shadow: none;
		margin: 0 !important;
	}
	body.login { align-items: stretch; }
}

/* Accessibility: honor reduced-motion — freeze the drift + pulse. */
@media (prefers-reduced-motion: reduce) {
	.incube-carousel__col { animation: none !important; }
	.incube-card--mauve .incube-card__rec { animation: none !important; }
	.login .button-primary,
	.login #wp-submit { transition: none !important; }
}
