/*
|--------------------------------------------------------------------------
| Reset estrutural
|--------------------------------------------------------------------------
*/

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

html {
	min-width: 320px;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	min-width: 320px;
	min-height: 100vh;
	overflow-x: clip;
	background: var(--th-gray-050);
	color: var(--th-gray-900);
	font-family: var(--font-body);
	font-size: var(--text-base);
	font-weight: 400;
	line-height: 1.7;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.admin-bar {
	min-height: calc(100vh - 32px);
}

main {
	display: block;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

.th-watermark-mark {
	display: block;
	object-fit: contain;
}

iframe {
	max-width: 100%;
	border: 0;
}

button,
input,
textarea,
select {
	margin: 0;
	color: inherit;
	font: inherit;
}

button {
	border: 0;
	cursor: pointer;
}

textarea {
	resize: vertical;
}

a {
	color: inherit;
	text-decoration: none;
}

a,
button,
input,
textarea,
select {
	-webkit-tap-highlight-color: transparent;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

ul[role="list"],
ol[role="list"] {
	list-style: none;
}

/*
|--------------------------------------------------------------------------
| Tipografia global
|--------------------------------------------------------------------------
*/

h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
figure {
	margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: inherit;
	font-family: var(--font-display);
	font-weight: 400;
	line-height: 1.06;
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

strong,
b {
	font-weight: 700;
}

::selection {
	background: var(--th-wine);
	color: var(--th-white);
}

/*
|--------------------------------------------------------------------------
| Containers
|--------------------------------------------------------------------------
*/

.container {
	width: min(
		calc(100% - (var(--page-gutter) * 2)),
		var(--container)
	);
	margin-inline: auto;
}

.container--wide {
	width: min(
		calc(100% - (var(--page-gutter) * 2)),
		var(--container-wide)
	);
	margin-inline: auto;
}

.container--text {
	width: min(
		calc(100% - (var(--page-gutter) * 2)),
		var(--container-text)
	);
	margin-inline: auto;
}

.section {
	position: relative;
	padding-block: var(--section-space);
}

.section--small {
	padding-block: var(--section-space-sm);
}

.section--large {
	padding-block: var(--section-space-lg);
}

/*
|--------------------------------------------------------------------------
| Elementos reutilizáveis
|--------------------------------------------------------------------------
*/

.th-kicker {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--th-wine);
	font-family: var(--font-label);
	font-size: var(--text-xs);
	font-weight: 700;
	letter-spacing: 0.28em;
	line-height: 1;
	text-transform: uppercase;
}

.th-kicker::before {
	width: 28px;
	height: 1px;
	background: currentColor;
	content: "";
}

.th-title {
	max-width: 1100px;
	font-size: var(--title-md);
	letter-spacing: -0.035em;
}

.th-text {
	max-width: 720px;
	color: var(--th-gray-600);
	font-size: clamp(1rem, 1.2vw, 1.125rem);
	line-height: 1.85;
}

.th-glass {
	background: var(--glass-light-background);
	border: 1px solid var(--glass-light-border);
	box-shadow: var(--shadow-soft);
	-webkit-backdrop-filter:
		blur(var(--glass-blur))
		saturate(var(--glass-saturation));
	backdrop-filter:
		blur(var(--glass-blur))
		saturate(var(--glass-saturation));
}

.th-glass--dark {
	background: var(--glass-dark-background);
	border-color: var(--glass-dark-border);
	color: var(--th-white);
}

.th-glass--wine {
	background: var(--glass-wine-background);
	border-color: rgb(var(--th-white-rgb) / 0.16);
	color: var(--th-white);
}

/*
|--------------------------------------------------------------------------
| Acessibilidade
|--------------------------------------------------------------------------
*/

.screen-reader-text,
.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: var(--z-modal);
	padding: 12px 18px;
	transform: translateY(-160%);
	background: var(--th-wine);
	color: var(--th-white);
	font-weight: 700;
	transition: transform var(--transition-fast);
}

.skip-link:focus {
	transform: translateY(0);
}

:focus-visible {
	outline: 2px solid var(--th-red);
	outline-offset: 4px;
}

/*
|--------------------------------------------------------------------------
| Tela provisória do tema
|--------------------------------------------------------------------------
*/

.th-dev-screen {
	position: relative;
	display: grid;
	min-height: 100vh;
	place-items: center;
	padding-block: 120px;
	overflow: hidden;
	background:
		linear-gradient(
			135deg,
			rgb(var(--th-black-rgb) / 0.96),
			rgb(var(--th-wine-rgb) / 0.78)
		);
	color: var(--th-white);
}

.th-dev-screen::before {
	position: absolute;
	inset: -25%;
	background:
		radial-gradient(
			circle,
			rgb(var(--th-white-rgb) / 0.12),
			transparent 46%
		);
	content: "";
	pointer-events: none;
}

.th-dev-screen__content {
	position: relative;
	z-index: var(--z-content);
	max-width: 900px;
	padding: clamp(28px, 5vw, 64px);
	border-radius: var(--radius-lg);
}

.th-dev-screen__title {
	margin-top: 28px;
	font-size: var(--title-md);
	letter-spacing: -0.04em;
}

.th-dev-screen__text {
	max-width: 620px;
	margin-top: 28px;
	color: rgb(var(--th-white-rgb) / 0.74);
	font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.th-dev-screen__text article + article {
	margin-top: 32px;
	padding-top: 32px;
	border-top: 1px solid rgb(var(--th-white-rgb) / 0.14);
}

.th-dev-screen__text article h2 {
	margin-bottom: 10px;
	font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.th-dev-screen__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 36px;
}

/*
|--------------------------------------------------------------------------
| Responsividade
|--------------------------------------------------------------------------
*/

@media (max-width: 782px) {
	body.admin-bar {
		min-height: calc(100vh - 46px);
	}
}

@media (max-width: 767px) {
	.th-kicker {
		gap: 10px;
		letter-spacing: 0.22em;
	}

	.th-kicker::before {
		width: 20px;
	}

	.th-dev-screen__content {
		border-radius: var(--radius-md);
	}
}

/*
|--------------------------------------------------------------------------
| Redução de movimento
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
