/*
Theme Name:        Receitas Pro Theme
Theme URI:         https://academiawpx.com/
Author:            Mesaque Mota (Academia WPX)
Author URI:        https://academiawpx.com
Description:       Tema clássico moderno para blogs e portais de receitas, integrado ao plugin ReceitasProWPX. Performance, SEO gastronômico, cards configuráveis e experiência de cozinha interativa.
Version:           1.0.1
Requires at least: 6.4
Tested up to:      7.1
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       receitas-pro-theme
Tags:              food-and-drink, blog, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready, grid-layout
*/

/* ==========================================================================
   1. DESIGN TOKENS (--rpt-*)
   Valores padrão (preset "gourmet_terracotta"). O Customizer sobrescreve
   estes tokens via inline CSS (class-rpt-dynamic-css.php, Sprint 2).
   ========================================================================== */
:root {
	/* Cores */
	--rpt-color-primary: #e05a47;
	--rpt-color-primary-contrast: #ffffff;
	--rpt-color-secondary: #1e1e24;
	--rpt-bg-body: #fffbf7;
	--rpt-bg-surface: #ffffff;
	--rpt-text-main: #1e1e24;
	--rpt-text-muted: #6b6b76;
	--rpt-border-color: rgba(30, 30, 36, 0.1);
	--rpt-star-color: #ffb800;
	--rpt-success: #2e7d32;
	--rpt-danger: #c62828;

	/* Tipografia */
	--rpt-font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
	--rpt-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--rpt-font-size-base: 17px;
	--rpt-line-height: 1.7;
	--rpt-fs-sm: 0.875rem;
	--rpt-fs-md: 1rem;
	--rpt-fs-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.3rem);
	--rpt-fs-h1: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
	--rpt-fs-h2: clamp(1.6rem, 1.3rem + 1.5vw, 2.4rem);
	--rpt-fs-h3: clamp(1.3rem, 1.15rem + 0.8vw, 1.75rem);
	--rpt-fs-h4: 1.2rem;

	/* Layout */
	--rpt-container: 1280px;
	--rpt-gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
	--rpt-sidebar-width: 320px;
	--rpt-radius: 16px;
	--rpt-radius-sm: calc(var(--rpt-radius) / 2);
	--rpt-radius-pill: 999px;

	/* Espaçamento */
	--rpt-space-1: 0.25rem;
	--rpt-space-2: 0.5rem;
	--rpt-space-3: 0.75rem;
	--rpt-space-4: 1rem;
	--rpt-space-5: 1.5rem;
	--rpt-space-6: 2rem;
	--rpt-space-7: 3rem;
	--rpt-space-8: 4.5rem;

	/* Sombras e transições */
	--rpt-shadow-sm: 0 1px 3px rgba(30, 30, 36, 0.08);
	--rpt-shadow-md: 0 8px 24px rgba(30, 30, 36, 0.1);
	--rpt-shadow-lg: 0 18px 48px rgba(30, 30, 36, 0.16);
	--rpt-transition: 0.2s ease;

	/* Cards */
	--rpt-card-aspect-ratio: 4 / 3;
	--rpt-card-columns: 3;
	--rpt-card-columns-mobile: 1;

	/* Alturas fixas */
	--rpt-header-height: 72px;
	--rpt-touch-target: 44px;
}

/* ==========================================================================
   2. RESET MODERNO
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	font-size: var(--rpt-font-size-base);
}

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

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

body {
	margin: 0;
	min-height: 100vh;
	background-color: var(--rpt-bg-body);
	color: var(--rpt-text-main);
	font-family: var(--rpt-font-body);
	font-size: 1rem;
	line-height: var(--rpt-line-height);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--rpt-space-4);
	font-family: var(--rpt-font-heading);
	font-weight: 700;
	line-height: 1.2;
	color: var(--rpt-text-main);
	text-wrap: balance;
}

h1 { font-size: var(--rpt-fs-h1); }
h2 { font-size: var(--rpt-fs-h2); }
h3 { font-size: var(--rpt-fs-h3); }
h4 { font-size: var(--rpt-fs-h4); }
h5,
h6 { font-size: var(--rpt-fs-md); }

p,
ul,
ol,
dl,
blockquote,
figure,
table,
pre {
	margin: 0 0 var(--rpt-space-5);
}

ul,
ol {
	padding-left: 1.4em;
}

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

img {
	font-style: italic;
	vertical-align: middle;
}

a {
	color: var(--rpt-color-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--rpt-transition);
}

a:hover {
	color: var(--rpt-color-secondary);
}

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

button {
	cursor: pointer;
}

table {
	width: 100%;
	border-collapse: collapse;
}

blockquote {
	padding: var(--rpt-space-4) var(--rpt-space-5);
	border-left: 4px solid var(--rpt-color-primary);
	background: var(--rpt-bg-surface);
	border-radius: 0 var(--rpt-radius-sm) var(--rpt-radius-sm) 0;
	font-style: italic;
}

hr {
	border: 0;
	border-top: 1px solid var(--rpt-border-color);
	margin: var(--rpt-space-6) 0;
}

:focus-visible {
	outline: 3px solid var(--rpt-color-primary);
	outline-offset: 2px;
}

::selection {
	background: var(--rpt-color-primary);
	color: var(--rpt-color-primary-contrast);
}

/* ==========================================================================
   3. ACESSIBILIDADE E UTILITÁRIOS
   ========================================================================== */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--rpt-bg-surface);
	border-radius: var(--rpt-radius-sm);
	box-shadow: var(--rpt-shadow-lg);
	clip: auto !important;
	clip-path: none;
	color: var(--rpt-color-primary);
	display: block;
	font-weight: 700;
	height: auto;
	left: 8px;
	line-height: normal;
	padding: 14px 24px;
	top: 8px;
	width: auto;
	z-index: 100000;
}

.skip-link {
	position: absolute;
	left: -9999px;
}

.skip-link:focus {
	left: 8px;
	top: 8px;
	z-index: 100000;
}

/* ==========================================================================
   4. LAYOUT BASE
   ========================================================================== */
.rpt-container {
	width: 100%;
	max-width: var(--rpt-container);
	margin-inline: auto;
	padding-inline: var(--rpt-gutter);
}

.rpt-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.rpt-main {
	flex: 1 0 auto;
	padding-block: var(--rpt-space-6);
}

/* Alinhamentos nativos do WordPress */
.alignleft {
	float: left;
	margin: 0 var(--rpt-space-5) var(--rpt-space-4) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--rpt-space-4) var(--rpt-space-5);
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption,
figcaption {
	font-size: var(--rpt-fs-sm);
	color: var(--rpt-text-muted);
	text-align: center;
}

.sticky {
	position: relative;
}

.bypostauthor {
	display: block;
}
