/* ==========================================================================
   Landing page do Odds Scanner Cup
   Desenho: Figma "Odds Scanner Cup", nós 23753:5274 (mobile) e 23824:4957.

   A folha é auto-suficiente e todas as classes têm prefixo osc-, porque a
   página não usa o cabeçalho nem o rodapé do tema e não deve herdar nem
   contaminar nada do resto do site.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Geist, alojada no próprio tema.

   A fonte estava declarada mas nunca chegava a ser carregada, portanto a
   página caía no tipo de letra do sistema. Fica aqui em ficheiro próprio, e
   não no Google Fonts, para não depender de terceiros nem abrir mais uma
   ligação antes do primeiro desenho. É uma variable font: um ficheiro cobre
   os pesos todos, de 400 a 700.
   -------------------------------------------------------------------------- */

@font-face {
	font-family: "Geist";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/geist-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
		U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
		U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Geist";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/geist-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
		U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
		U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
		U+A720-A7FF;
}

.osc-cup {
	--osc-surface-base: #131313;
	--osc-surface-soft: #181818;
	--osc-highlight: #30f177;
	--osc-headline: #ffffff;
	--osc-body: #e6ebf2;
	--osc-caption: #aaadb2;
	--osc-disabled: #7c8187;
	--osc-border: rgba(255, 255, 255, 0.08);
	--osc-danger: #ff8f8f;
	--osc-radius: 8px;
	--osc-radius-lg: 14px;
	--osc-pill: 200px;

	margin: 0;
	background: var(--osc-surface-base);
	color: var(--osc-body);
	font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	/* O degradê do topo sangra para fora; nada deve criar barra horizontal. */
	overflow-x: hidden;
}

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

/* Vários blocos desta página são flex e trazem o atributo hidden do lado do
   servidor. Sem isto, o display do flex ganha ao hidden e o bloco aparece. */
.osc-cup [hidden] {
	display: none !important;
}

.osc-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.osc-page {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Fundo do topo
   -------------------------------------------------------------------------- */

.osc-hero-bg {
	position: absolute;
	inset: 0 0 auto 0;
	height: 600px;
	overflow: hidden;
	pointer-events: none;
}

/* A arte do topo já vem tratada, portanto é só cobrir a área do hero: sem
   rotação e sem o degradê verde que antes a colorava. */
.osc-hero-bg__art {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center top;
}

.osc-hero-bg__fade {
	position: absolute;
	top: 42px;
	right: 0;
	left: 0;
	height: 615px;
	background-image: linear-gradient(161.71deg, rgba(11, 16, 14, 0) 19.323%, rgb(19, 19, 19) 55.648%);
}

/* --------------------------------------------------------------------------
   Cabeçalho
   -------------------------------------------------------------------------- */

.osc-header {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	padding: 16px 24px;
}

.osc-header__logo {
	width: auto;
	height: 28px;
}

/* O logótipo do Cup vem com o símbolo em degradê verde. No cabeçalho quer-se a
   marca toda a branco: brightness(0) achata-a a preto e invert(1) devolve-a a
   branco sólido, sem precisar de um segundo ficheiro. */
.osc-header__logo--cup {
	filter: brightness(0) invert(1);
}

/* Ícone de ligação entre as duas marcas, no lugar do antigo divisor. */
.osc-header__link {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.07);
	backdrop-filter: blur(7.143px);
	color: var(--osc-headline);
}

.osc-header__link svg {
	width: 10px;
	height: 10px;
}

/* --------------------------------------------------------------------------
   Conteúdo
   -------------------------------------------------------------------------- */

.osc-main {
	position: relative;
	z-index: 1;
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	padding: 32px 16px 64px;
}

.osc-intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 100%;
	max-width: 576px;
	text-align: center;
}

.osc-tag {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 8px 16px;
	border-radius: var(--osc-pill);
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(6px);
	font-size: 14px;
	font-weight: 500;
	line-height: 24px;
	color: var(--osc-headline);
}

.osc-tag__icon {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--osc-highlight);
}

.osc-title {
	margin: 0;
	font-size: 32px;
	font-weight: 700;
	line-height: 40px;
	letter-spacing: -0.64px;
	color: var(--osc-body);
	text-wrap: balance;
}

.osc-subtitle {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 28px;
	color: var(--osc-body);
	text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Contagem decrescente

   A animação é a do FlipClock.js, reescrita sem jQuery. Cada carta tem duas
   metades: quando o dígito muda, a metade de cima do valor antigo tomba para a
   frente e, quando acaba, a metade de baixo do valor novo sobe para o lugar.
   O degradê por cima é o que dá o volume ao movimento.
   -------------------------------------------------------------------------- */

.osc-countdown {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
}

.osc-countdown__units {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 4px;
}

.osc-unit {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.osc-unit__cards {
	display: flex;
	align-items: center;
	gap: 4px;
}

.osc-unit__label {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	border-radius: var(--osc-radius);
	background: var(--osc-surface-soft);
	font-size: 12px;
	font-weight: 500;
	line-height: 24px;
	color: var(--osc-caption);
}

.osc-countdown__sep {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 12px;
	height: 44px;
}

.osc-countdown__sep i {
	width: 4px;
	height: 4px;
	background: var(--osc-disabled);
}

/* Os segundos só aparecem em ecrã grande, como no desenho. O contador continua
   a bater a cada segundo, para os minutos virarem na altura certa.
   Esta regra tem de vir depois de .osc-unit e de .osc-countdown__sep: têm a
   mesma especificidade, portanto quem ganha é a última. */
.osc-unit--seconds,
.osc-countdown__sep--seconds {
	display: none;
}

.osc-card {
	position: relative;
	width: 44px;
	height: 44px;
	border-radius: var(--osc-radius);
	background-color: var(--osc-surface-soft);
	background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.03) 100%);
	font-size: 22px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: -0.48px;
	color: var(--osc-body);
	perspective: 300px;
}

.osc-card__half {
	position: absolute;
	left: 0;
	width: 100%;
	height: 50%;
	overflow: hidden;
	backface-visibility: hidden;
}

.osc-card__half--top {
	top: 0;
	border-radius: var(--osc-radius) var(--osc-radius) 0 0;
	transform-origin: 50% 100%;
}

.osc-card__half--bottom {
	bottom: 0;
	border-radius: 0 0 var(--osc-radius) var(--osc-radius);
	transform-origin: 50% 0;
}

/* O dígito é desenhado à altura total da carta e cortado pela metade que o
   contém, para as duas metades serem exactamente o mesmo glifo. */
.osc-card__digit {
	position: absolute;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 200%;
	font-variant-numeric: tabular-nums;
}

.osc-card__half--top .osc-card__digit { top: 0; }
.osc-card__half--bottom .osc-card__digit { bottom: 0; }

/* As folhas em movimento, criadas pelo JavaScript durante a transição. */
.osc-card__leaf {
	z-index: 3;
	background-color: var(--osc-surface-soft);
	background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.osc-card__leaf--top {
	animation: osc-fall 0.3s linear both;
}

.osc-card__leaf--bottom {
	animation: osc-rise 0.3s 0.3s linear both;
}

.osc-card__shade {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
}

.osc-card__leaf--top .osc-card__shade {
	background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
	animation: osc-shade-in 0.3s linear both;
}

.osc-card__leaf--bottom .osc-card__shade {
	background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
	animation: osc-shade-out 0.3s 0.3s linear both;
}

@keyframes osc-fall {
	from { transform: rotateX(0deg); }
	to { transform: rotateX(-90deg); }
}

@keyframes osc-rise {
	from { transform: rotateX(90deg); }
	to { transform: rotateX(0deg); }
}

@keyframes osc-shade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes osc-shade-out {
	from { opacity: 1; }
	to { opacity: 0; }
}

.osc-countdown__date {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	line-height: 24px;
}

.osc-countdown__date-icon {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--osc-headline);
}

.osc-countdown__date-prefix {
	font-weight: 500;
	color: var(--osc-caption);
}

.osc-countdown__date-value {
	font-weight: 600;
	color: var(--osc-headline);
}

.osc-countdown__done {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}

.osc-countdown__done-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 32px;
	letter-spacing: -0.48px;
	color: var(--osc-headline);
}

.osc-countdown__done-text {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
	color: var(--osc-caption);
}

/* --------------------------------------------------------------------------
   Imagem
   -------------------------------------------------------------------------- */

.osc-visual {
	position: relative;
	width: 100%;
	max-width: 578px;
	aspect-ratio: 343 / 400;
	overflow: hidden;
	border-radius: var(--osc-radius-lg);
	background: var(--osc-surface-soft);
}

.osc-visual__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Enquanto a arte não existe, fica um brilho verde a desenhar o espaço. */
.osc-visual__placeholder {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(120% 90% at 50% 0%, rgba(48, 241, 119, 0.12) 0%, rgba(19, 19, 19, 0) 60%);
}

/* --------------------------------------------------------------------------
   Formulário
   -------------------------------------------------------------------------- */

.osc-form-block {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	max-width: 578px;
}

.osc-form__label {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 16px;
	color: var(--osc-headline);
}

.osc-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	transition: border-color 0.2s ease;
}

.osc-form__field {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 24px;
	border: 1px solid var(--osc-border);
	border-radius: var(--osc-pill);
	transition: border-color 0.2s ease;
}

.osc-form__field:hover,
.osc-form__field:focus-within {
	border-color: var(--osc-headline);
}

.osc-form__icon {
	flex: none;
	width: 24px;
	height: 24px;
	color: var(--osc-headline);
}

.osc-form__input {
	flex: 1;
	min-width: 0;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 16px;
	color: var(--osc-headline);
	outline: none;
}

.osc-form__input::placeholder {
	color: var(--osc-disabled);
}

.osc-form__input:disabled {
	opacity: 0.6;
}

/* Fora de vista para gente, alcançável por robôs. */
.osc-form__trap {
	position: absolute;
	left: -9999px;
	width: 0;
	height: 0;
	overflow: hidden;
}

.osc-button {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	gap: 16px;
	height: 48px;
	padding: 8px 8px 8px 24px;
	border: 0;
	border-radius: var(--osc-pill);
	background: #ffffff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 16px;
	color: #09090a;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.osc-button:hover {
	opacity: 0.9;
}

.osc-button:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.osc-form__submit > span:first-child {
	flex: 1;
	text-align: left;
}

.osc-button__arrow {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--osc-pill);
	background: var(--osc-surface-base);
}

.osc-button__arrow svg {
	width: 16px;
	height: 16px;
	color: #ffffff;
}

.osc-form__status {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 24px;
	text-align: center;
}

.osc-form__status:empty {
	display: none;
}

.osc-form__status--success {
	color: var(--osc-highlight);
}

.osc-form__status--error {
	color: var(--osc-danger);
}

.osc-form__suggestion {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-weight: 600;
	color: var(--osc-headline);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.osc-form__disclaimer {
	font-size: 14px;
	font-weight: 500;
	line-height: 24px;
	color: var(--osc-caption);
	text-align: center;
}

.osc-form__disclaimer p {
	margin: 0;
}

.osc-form__disclaimer a {
	font-weight: 600;
	color: var(--osc-headline);
	text-decoration: none;
	text-underline-offset: 2px;
}

.osc-form__disclaimer a:hover {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Rodapé
   -------------------------------------------------------------------------- */

.osc-footer {
	position: relative;
	z-index: 1;
	border-top: 1px solid var(--osc-border);
}

.osc-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 596px;
	margin: 0 auto;
	padding: 16px;
}

.osc-footer__link {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	color: var(--osc-body);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.osc-footer__link:hover {
	opacity: 0.8;
}

.osc-footer__link--pill {
	padding: 8px 16px 8px 8px;
	border-radius: var(--osc-pill);
	background: var(--osc-surface-soft);
	font-size: 12px;
	line-height: 16px;
	color: var(--osc-headline);
}

.osc-footer__icon {
	flex: none;
	width: 16px;
	height: 16px;
}

.osc-footer__arrow {
	flex: none;
	width: 24px;
	height: 24px;
}

/* --------------------------------------------------------------------------
   Ecrãs grandes
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
	.osc-card {
		width: 48px;
		height: 48px;
		font-size: 24px;
	}

	.osc-countdown__sep {
		height: 48px;
	}

	.osc-countdown__units {
		gap: 8px;
	}
}

@media (min-width: 1024px) {
	.osc-header {
		gap: 40px;
		padding: 20px 112px;
	}

	.osc-header__logo {
		height: 40px;
	}

	.osc-header__link {
		width: 28px;
		height: 28px;
	}

	.osc-header__link svg {
		width: 14px;
		height: 14px;
	}

	.osc-main {
		gap: 64px;
		padding: 32px 112px 64px;
	}

	.osc-tag {
		font-size: 16px;
	}

	.osc-title {
		font-size: 40px;
		line-height: 48px;
		letter-spacing: -0.8px;
	}

	.osc-subtitle {
		font-size: 18px;
		line-height: 32px;
	}

	.osc-unit--seconds {
		display: flex;
	}

	.osc-countdown__sep--seconds {
		display: flex;
	}

	.osc-card {
		width: 56px;
		height: 56px;
	}

	.osc-countdown__sep {
		width: 16px;
		height: 56px;
	}

	.osc-unit__cards {
		gap: 8px;
	}

	.osc-unit__label {
		padding: 8px 12px;
		font-size: 16px;
	}

	.osc-countdown__date {
		font-size: 16px;
	}

	.osc-countdown__date-icon {
		width: 24px;
		height: 24px;
	}

	.osc-visual {
		aspect-ratio: 578 / 440;
	}

	/* Em ecrã grande o campo e o botão partilham a mesma cápsula. */
	.osc-form {
		flex-direction: row;
		align-items: center;
		gap: 8px;
		padding: 8px 8px 8px 24px;
		border: 1px solid var(--osc-border);
		border-radius: var(--osc-pill);
	}

	.osc-form:hover,
	.osc-form:focus-within {
		border-color: var(--osc-headline);
	}

	.osc-form__field {
		flex: 1;
		padding: 0;
		border: 0;
	}

	.osc-form__field:hover,
	.osc-form__field:focus-within {
		border-color: transparent;
	}

	.osc-form__submit {
		width: 211px;
	}

	.osc-form__status,
	.osc-form__disclaimer {
		text-align: center;
	}
}

/* --------------------------------------------------------------------------
   Quem prefere menos movimento
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.osc-card__leaf,
	.osc-card__shade {
		animation: none !important;
	}

	.osc-cup * {
		transition-duration: 0.01ms !important;
	}
}
