/*--------------------------------------------------------------
  F&M ÆVUS sign-in page  (templates/signin.php)
  Split card: photo left, form right, same photo softly blurred behind.
--------------------------------------------------------------*/
body.fm-signin {
	--sn-cream: #f3efe6;
	--sn-ink: #14110d;
	--sn-muted: #6f695d;
	--sn-line: #d8d0c1;
	--sn-gold: #8c6a2d;      /* link gold, dark enough to read on cream */
	--sn-gold-soft: #b8925a;
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	background: #0d0a07;
	color: var(--sn-ink);
	font-family: var(--fm-font-body, 'Jost', -apple-system, BlinkMacSystemFont, sans-serif);
	-webkit-font-smoothing: antialiased;
}

body.fm-signin *,
body.fm-signin *::before,
body.fm-signin *::after {
	box-sizing: border-box;
}

/* The page stands alone: no theme extras around the card. */
body.fm-signin .fm-top,
body.fm-signin .wprs-rewards-btn,
body.fm-signin .wprs-rw-panel,
body.fm-signin .wprs-rw-show,
body.fm-signin .fm-cart-drawer,
body.fm-signin .fm-announcement {
	display: none !important;
}

/* ---------- Stage + blurred background ---------- */
.fm-sn {
	position: relative;
	isolation: isolate;
	display: grid;
	place-items: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 40px 28px;
	overflow: hidden;
}

.fm-sn__bg {
	position: fixed;
	inset: -30px;
	z-index: -1;
	background: #0d0a07 url('../img/signin-bg.jpg') center / cover no-repeat;
	filter: blur(7px) brightness(0.62) saturate(1.05);
	transform: scale(1.04);
}

/* ---------- Card ---------- */
.fm-sn__card {
	display: grid;
	grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
	width: min(1180px, 100%);
	min-height: 700px;
	border-radius: 22px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
	background: var(--sn-cream);
}

/* ---------- Left: photo ---------- */
.fm-sn__visual {
	position: relative;
	min-height: 100%;
	background: #0d0a07;
}

.fm-sn__visual picture,
.fm-sn__visual img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.fm-sn__visual img {
	object-fit: cover;
	object-position: 46% 50%;
}

.fm-sn__visual::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(8, 6, 4, 0.78) 0%, rgba(8, 6, 4, 0) 34%);
	pointer-events: none;
}

.fm-sn__tag {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 52px;
	z-index: 1;
	margin: 0;
	text-align: center;
	color: #f1e8d6;
	font-family: var(--fm-font-serif, 'Cormorant Garamond', Georgia, serif);
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.34em;
	line-height: 1.9;
	text-transform: uppercase;
}

.fm-sn__tag::after {
	content: '';
	display: block;
	width: 76px;
	height: 1px;
	margin: 22px auto 0;
	background: rgba(241, 232, 214, 0.6);
}

/* ---------- Right: form ---------- */
.fm-sn__panel {
	display: flex;
	align-items: center;
	padding: 52px clamp(28px, 5vw, 68px);
	background: var(--sn-cream);
}

.fm-sn__inner {
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
}

.fm-sn__brand {
	display: block;
	text-align: center;
	color: var(--sn-ink);
	text-decoration: none;
}

.fm-sn__brand-name {
	display: block;
	font-family: var(--fm-font-header, 'Hurricane', cursive);
	font-size: clamp(3rem, 6vw, 3.9rem);
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: 0.02em;
}

.fm-sn__brand-tag {
	display: block;
	margin-top: 10px;
	font-family: var(--fm-font-serif, 'Cormorant Garamond', Georgia, serif);
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.5em;
	text-transform: uppercase;
	color: #3b352c;
	padding-left: 0.5em; /* balances the trailing letter-spacing */
}

.fm-sn__rule {
	width: 96px;
	height: 0;
	margin: 24px auto 26px;
	border: 0;
	border-top: 1px solid #3b352c;
	opacity: 0.7;
}

.fm-sn__title {
	margin: 0;
	text-align: center;
	font-family: var(--fm-font-serif, 'Cormorant Garamond', Georgia, serif);
	font-size: clamp(2.1rem, 4vw, 2.9rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.005em;
	color: #0f0c09;
}

.fm-sn__sub {
	margin: 10px 0 28px;
	text-align: center;
	font-family: var(--fm-font-serif, 'Cormorant Garamond', Georgia, serif);
	font-size: 1.08rem;
	font-weight: 500;
	color: var(--sn-muted);
}

/* ---------- Notices (WooCommerce errors / messages) ---------- */
.fm-sn__notices:empty {
	display: none;
}

.fm-sn__notices ul,
.fm-sn__notices .woocommerce-error,
.fm-sn__notices .woocommerce-message,
.fm-sn__notices .woocommerce-info {
	list-style: none;
	margin: 0 0 18px;
	padding: 12px 14px;
	border: 1px solid #efc7c7;
	border-radius: 8px;
	background: #fbeeee;
	color: #8f2a2a;
	font-size: 0.88rem;
	line-height: 1.5;
}

.fm-sn__notices .woocommerce-message,
.fm-sn__notices .woocommerce-info {
	border-color: #cfe3cf;
	background: #eef6ee;
	color: #2f5d2f;
}

.fm-sn__notices li {
	margin: 0;
	padding: 0;
}

.fm-sn__notices li + li {
	margin-top: 4px;
}

.fm-sn__notices ::before {
	display: none !important;
}

.fm-sn__notices a {
	color: inherit;
	font-weight: 600;
}

.fm-sn__notices .button {
	display: none;
}

/* ---------- Fields ---------- */
.fm-sn__field {
	margin: 0 0 20px;
}

.fm-sn__field label {
	display: block;
	margin: 0 0 8px;
	font-size: 0.86rem;
	font-weight: 500;
	color: #1a1612;
}

.fm-sn__input {
	position: relative;
	display: flex;
	align-items: center;
	height: 50px;
	border: 1px solid var(--sn-line);
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.45);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.fm-sn__input:focus-within {
	border-color: var(--sn-gold-soft);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(184, 146, 90, 0.22);
}

.fm-sn__ico {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: #4d473c;
	pointer-events: none;
}

.fm-sn__input input {
	flex: 1;
	min-width: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0 14px 0 46px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	box-shadow: none;
	color: var(--sn-ink);
	font: inherit;
	font-size: 0.95rem;
	outline: 0;
}

.fm-sn__input input::placeholder {
	color: var(--sn-muted);
	opacity: 1;
}

/* room for the show/hide eye */
.fm-sn__input--pw input {
	padding-right: 50px;
}

/* browsers' autofill colouring would hide the cream look */
.fm-sn__input input:-webkit-autofill {
	-webkit-box-shadow: 0 0 0 40px #fbf9f4 inset;
	-webkit-text-fill-color: var(--sn-ink);
}

.fm-sn__eye {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #4d473c;
	cursor: pointer;
}

.fm-sn__eye:hover {
	color: #000;
}

.fm-sn__eye:focus-visible {
	outline: 2px solid var(--sn-gold-soft);
	outline-offset: 1px;
}

.fm-sn__eye .fm-sn__eye-off,
.fm-sn__eye[aria-pressed='true'] .fm-sn__eye-on {
	display: none;
}

.fm-sn__eye[aria-pressed='true'] .fm-sn__eye-off {
	display: block;
}

/* ---------- Remember me / forgot ---------- */
.fm-sn__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 2px 0 24px;
}

.fm-sn__check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 0.88rem;
	color: #1a1612;
	cursor: pointer;
}

.fm-sn__check input {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1.5px solid #14110d;
	border-radius: 5px;
	background: transparent;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.fm-sn__check input:checked {
	background: #14110d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 10.5 3.2 3.2L15 6.8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.fm-sn__check input:focus-visible {
	outline: 2px solid var(--sn-gold-soft);
	outline-offset: 2px;
}

.fm-sn__link,
.fm-sn__switch a {
	color: var(--sn-gold);
	font-weight: 500;
	text-decoration: none;
}

.fm-sn__link {
	font-size: 0.88rem;
}

.fm-sn__link:hover,
.fm-sn__switch a:hover {
	text-decoration: underline;
}

.fm-sn__hint {
	margin: -4px 0 20px;
	font-size: 0.85rem;
	color: var(--sn-muted);
}

/* ---------- Buttons ---------- */
.fm-sn__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background: #12100c;
	color: #f6f0e4;
	font-family: var(--fm-font-serif, 'Cormorant Garamond', Georgia, serif);
	font-size: 1.2rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.fm-sn__submit:hover {
	background: #2b2118;
}

.fm-sn__submit:active {
	transform: translateY(1px);
}

.fm-sn__submit:focus-visible {
	outline: 2px solid var(--sn-gold-soft);
	outline-offset: 3px;
}

.fm-sn__submit .fm-sn__arrow {
	transition: transform 0.2s ease;
}

.fm-sn__submit:hover .fm-sn__arrow {
	transform: translateX(4px);
}

.fm-sn__submit.is-loading {
	opacity: 0.75;
	cursor: progress;
}

.fm-sn__or {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 24px 0 20px;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	color: #7a7366;
}

.fm-sn__or::before,
.fm-sn__or::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--sn-line);
}

.fm-sn__social {
	display: grid;
	gap: 12px;
}

.fm-sn__sbtn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 50px;
	border: 1px solid var(--sn-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.3);
	color: #1a1612;
	font-size: 0.92rem;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.fm-sn__sbtn:hover {
	background: #fff;
	border-color: #c4baa6;
}

.fm-sn__sbtn:focus-visible {
	outline: 2px solid var(--sn-gold-soft);
	outline-offset: 2px;
}

.fm-sn__switch {
	margin: 28px 0 0;
	text-align: center;
	font-size: 0.86rem;
	color: #7a7366;
}

/* ---------- Sign-up with a code ---------- */
.fm-sn__otp [hidden] {
	display: none !important;
}

.fm-sn__msg {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.5;
}

.fm-sn__msg.is-error,
.fm-sn__msg.is-ok {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: 8px;
}

.fm-sn__msg.is-error {
	border: 1px solid #efc7c7;
	background: #fbeeee;
	color: #8f2a2a;
}

.fm-sn__msg.is-ok {
	border: 1px solid #cfe3cf;
	background: #eef6ee;
	color: #2f5d2f;
}

.fm-sn__msg a {
	color: inherit;
	font-weight: 600;
}

.fm-sn__hint--sent {
	margin: 0 0 20px;
	text-align: center;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #3b352c;
}

.fm-sn__input--code input {
	padding: 0 14px;
	text-align: center;
	font-size: 1.5rem;
	font-weight: 500;
	letter-spacing: 0.5em;
	text-indent: 0.5em; /* keeps the digits centred despite the trailing letter-spacing */
}

.fm-sn__input--code input::placeholder {
	letter-spacing: 0.4em;
	opacity: 0.6;
}

.fm-sn__row--links {
	margin: 18px 0 0;
}

.fm-sn__textbtn {
	padding: 6px 2px;
	border: 0;
	background: none;
	color: var(--sn-gold);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 500;
	cursor: pointer;
}

.fm-sn__textbtn:hover:not(:disabled) {
	text-decoration: underline;
}

.fm-sn__textbtn:disabled {
	color: var(--sn-muted);
	cursor: default;
}

.fm-sn__textbtn:focus-visible {
	outline: 2px solid var(--sn-gold-soft);
	outline-offset: 2px;
}

.fm-sn__submit:disabled {
	cursor: progress;
}

/* ---------- Tablet + phone: photo becomes a banner ---------- */
@media (max-width: 860px) {
	.fm-sn {
		padding: 20px 14px;
	}

	.fm-sn__card {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		min-height: 0;
		width: min(560px, 100%);
		border-radius: 18px;
	}

	.fm-sn__visual {
		height: 160px;
		min-height: 0;
	}

	/* Shows the candle and pearls, not the logo (the logo is repeated in the form below). */
	.fm-sn__visual img {
		object-position: 50% 75%;
	}

	.fm-sn__visual::after {
		background: linear-gradient(to top, rgba(243, 239, 230, 0.15), rgba(8, 6, 4, 0) 40%);
	}

	.fm-sn__tag {
		display: none;
	}

	.fm-sn__panel {
		padding: 32px 24px 30px;
	}

	.fm-sn__sub {
		margin-bottom: 24px;
	}
}

@media (max-width: 480px) {
	.fm-sn {
		padding: 12px 10px;
	}

	.fm-sn__panel {
		padding: 28px 18px 26px;
	}

	.fm-sn__rule {
		margin: 18px auto 20px;
	}

	/* 16px stops iPhones zooming the page when a field is tapped. */
	.fm-sn__input input {
		font-size: 1rem;
	}

	.fm-sn__row {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fm-sn__input,
	.fm-sn__submit,
	.fm-sn__submit .fm-sn__arrow,
	.fm-sn__sbtn {
		transition: none;
	}
}
