/* JA Newsletter – gate de notícias limitadas */
:root {
	--jan-accent: #b0151d;
	--jan-ink: #1d2433;
	--jan-muted: #5b6475;
	--jan-line: #dfe3ea;
	--jan-soft: #f5f6f8;
}

.jan-locked { position: relative; }

/* O texto visível desvanece-se até ao cartão, seja qual for a cor de fundo do tema. */
.jan-teaser {
	-webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 9rem), transparent 100%);
	mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 9rem), transparent 100%);
	max-height: none;
}

.jan-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 1.25rem 0 0;
}
.jan-gallery--1 { grid-template-columns: 1fr; }
.jan-gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jan-gallery__item { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--jan-soft); }
.jan-gallery--1 .jan-gallery__item { aspect-ratio: 21 / 9; }
.jan-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }

.jan-gate {
	margin: 1.5rem 0 2.5rem;
	color: var(--jan-ink);
	font-size: 16px;
	line-height: 1.5;
}

.jan-gate__card {
	position: relative;
	max-width: 640px;
	margin: 0 auto;
	padding: 28px 28px 22px;
	background: #fff;
	border: 1px solid var(--jan-line);
	border-top: 4px solid var(--jan-accent);
	border-radius: 4px 4px 10px 10px;
	box-shadow: 0 18px 40px -24px rgba(29, 36, 51, 0.35);
	text-align: left;
}

.jan-gate__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
	color: var(--jan-accent);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.2;
}

.jan-gate .jan-gate__title {
	margin: 0 0 8px;
	padding: 0;
	color: var(--jan-ink);
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem);
	line-height: 1.2;
	font-weight: 700;
	border: 0;
}
.jan-gate .jan-gate__title::before,
.jan-gate .jan-gate__title::after { display: none; }

.jan-gate .jan-gate__text {
	margin: 0 0 18px;
	color: var(--jan-muted);
	font-size: 16px;
	max-width: 52ch;
}

.jan-gate__form { margin: 0; }

.jan-gate__row {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.jan-gate .jan-gate__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 50px;
	margin: 0;
	padding: 0 14px;
	font: inherit;
	font-size: 16px;
	color: var(--jan-ink);
	background: #fff;
	border: 1.5px solid #b9c0cc;
	border-radius: 6px;
	box-shadow: none;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.jan-gate .jan-gate__input::placeholder { color: #8a93a3; }
.jan-gate .jan-gate__input:focus {
	border-color: var(--jan-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--jan-accent) 22%, transparent);
}
.jan-gate .jan-gate__input[aria-invalid="true"] { border-color: #c62828; }

.jan-gate .jan-gate__button {
	flex: 0 0 auto;
	height: 50px;
	margin: 0;
	padding: 0 22px;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	color: #fff;
	background: var(--jan-accent);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	transition: filter .15s ease, transform .15s ease;
}
.jan-gate .jan-gate__button:hover { filter: brightness(1.08); }
.jan-gate .jan-gate__button:active { transform: translateY(1px); }
.jan-gate .jan-gate__button:focus-visible { outline: 3px solid var(--jan-ink); outline-offset: 2px; }
.jan-gate .jan-gate__button[disabled] { cursor: progress; filter: saturate(.6); }

.jan-gate__consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--jan-ink);
	cursor: pointer;
}
.jan-gate__consent input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--jan-accent);
	cursor: pointer;
}
.jan-gate__consent.is-invalid { color: #c62828; }

.jan-gate .jan-terms-link {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	color: var(--jan-accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	background: none;
	border: 0;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}
.jan-gate .jan-terms-link:hover { text-decoration-thickness: 2px; background: none; }
.jan-gate .jan-terms-link:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.jan-gate .jan-terms-link:focus-visible { outline: 2px solid var(--jan-accent); outline-offset: 2px; border-radius: 2px; }

.jan-gate__error {
	margin: 12px 0 0;
	padding: 10px 12px;
	font-size: 14px;
	color: #8e1b1b;
	background: #fdecec;
	border-radius: 6px;
}
.jan-gate__error[hidden] { display: none; }

.jan-gate .jan-gate__note {
	margin: 16px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--jan-line);
	font-size: 13px;
	color: var(--jan-muted);
}

.jan-gate__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.jan-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.jan-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-right: 8px;
	vertical-align: -3px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: jan-spin .7s linear infinite;
}
@keyframes jan-spin { to { transform: rotate(360deg); } }

/* Revelação do artigo completo */
.jan-unlocked { animation: jan-reveal .6s ease-out both; }
@keyframes jan-reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Popup dos termos */
.jan-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.jan-modal[hidden] { display: none; }
.jan-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 22, 33, .58);
	animation: jan-fade .2s ease-out both;
}
.jan-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 720px;
	max-height: min(86vh, 900px);
	background: #fff;
	color: var(--jan-ink);
	border-radius: 12px;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
	outline: none;
	animation: jan-pop .22s ease-out both;
	font-size: 15px;
	line-height: 1.6;
}
.jan-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px 14px 24px;
	border-bottom: 1px solid var(--jan-line);
}
.jan-modal .jan-modal__title { margin: 0; padding: 0; font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--jan-ink); border: 0; }
.jan-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	color: var(--jan-muted);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.jan-modal__close:hover { background: var(--jan-soft); color: var(--jan-ink); }
.jan-modal__body {
	overflow-y: auto;
	padding: 18px 24px 8px;
	overscroll-behavior: contain;
}
.jan-modal__body h3 { margin: 1.4em 0 .4em; font-size: 16px; line-height: 1.35; font-weight: 700; letter-spacing: 0; color: var(--jan-ink); }
.jan-modal__body h3:first-child { margin-top: 0; }
.jan-modal__body p, .jan-modal__body li { color: #3a4253; max-width: 68ch; }
.jan-modal__body ul { padding-left: 1.2em; }
.jan-modal__body a { color: var(--jan-accent); }
.jan-modal__footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 14px 20px;
	border-top: 1px solid var(--jan-line);
	background: var(--jan-soft);
	border-radius: 0 0 12px 12px;
}
.jan-modal__footer button {
	height: 44px;
	padding: 0 18px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}
.jan-modal__secondary { color: var(--jan-ink); background: #fff; border: 1px solid #c4cad4; }
.jan-modal__accept { color: #fff; background: var(--jan-accent); border: 0; }
.jan-modal__footer button:focus-visible, .jan-modal__close:focus-visible { outline: 3px solid var(--jan-ink); outline-offset: 2px; }

@keyframes jan-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jan-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

body.jan-modal-open { overflow: hidden; }

/* Mensagem de sucesso */
.jan-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 999998;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	color: #fff;
	background: var(--jan-ink);
	border-radius: 999px;
	box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4);
	font-size: 15px;
	font-weight: 500;
	transform: translateX(-50%);
	animation: jan-toast 3.6s ease both;
}
.jan-toast svg { color: #7ee2a8; flex: 0 0 auto; }
@keyframes jan-toast {
	0% { opacity: 0; transform: translate(-50%, 12px); }
	10%, 85% { opacity: 1; transform: translate(-50%, 0); }
	100% { opacity: 0; transform: translate(-50%, 8px); }
}

@media (max-width: 560px) {
	.jan-gate__card { padding: 22px 18px 18px; }
	.jan-gate__row { flex-direction: column; }
	.jan-gate .jan-gate__button { width: 100%; }
	.jan-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.jan-gallery--1 { grid-template-columns: 1fr; }
	.jan-modal { padding: 0; align-items: flex-end; }
	.jan-modal__dialog { max-height: 92vh; border-radius: 14px 14px 0 0; }
	.jan-modal__footer { border-radius: 0; }
	.jan-modal__footer button { flex: 1 1 0; }
}

@media (prefers-reduced-motion: reduce) {
	.jan-unlocked, .jan-modal__dialog, .jan-modal__backdrop, .jan-toast { animation: none; }
	.jan-spinner { animation-duration: 1.6s; }
}
