/*
 * Hand-written CSS mirroring the React site's Tailwind design system.
 * Every color reads from the HSL custom properties in tokens.css, exactly
 * like the Tailwind config maps semantic tokens (bg-primary -> hsl(var(--primary)))
 * — the same source of truth, just consumed without a build step here.
 */

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: hsl(var(--background));
	color: hsl(var(--foreground));
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	font-family: 'Fraunces', serif;
	font-weight: 500;
	line-height: 1.15;
	margin: 0 0 0.5em;
}

h1 em, h2 em, h3 em, .italic {
	font-style: italic;
	color: hsl(var(--primary));
}

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

img {
	max-width: 100%;
	display: block;
}

.container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 2rem;
}

@media (max-width: 640px) {
	.container {
		padding: 0 1rem;
	}
}

/* "Eyebrow" small uppercase label used above headings across the site */
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: hsl(var(--primary));
	margin-bottom: 1.5rem;
}

.eyebrow::before {
	content: '';
	width: 2rem;
	height: 1px;
	background: hsl(var(--primary));
}

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: hsl(var(--background) / 0.95);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid hsl(var(--border));
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 5rem;
}

.site-header__logo {
	font-family: 'Fraunces', serif;
	font-style: italic;
	font-size: 1.25rem;
	font-weight: 600;
	color: hsl(var(--foreground));
}

.site-header__logo span {
	color: hsl(var(--primary));
	font-style: normal;
}

.site-header__nav {
	display: flex;
	align-items: center;
	gap: 2rem;
}

.site-header__nav a {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: hsl(var(--foreground));
	transition: color 0.15s ease;
}

.site-header__nav a:hover {
	color: hsl(var(--primary));
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border-radius: var(--radius);
	font-size: 0.875rem;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.btn--primary:hover {
	background: hsl(var(--primary-hover));
}

.btn--outline {
	background: transparent;
	border-color: hsl(var(--border));
	color: hsl(var(--foreground));
}

.btn--outline:hover {
	border-color: hsl(var(--primary));
	color: hsl(var(--primary));
}

/* ---------- Case study listing (front-page / archive) ---------- */

.caso-hero {
	padding: 6rem 0 4rem;
	background: var(--gradient-subtle);
	text-align: center;
}

.caso-hero h1 {
	font-size: clamp(2.5rem, 5vw, 3.75rem);
	max-width: 40rem;
	margin: 0 auto 1rem;
}

.caso-hero p {
	max-width: 36rem;
	margin: 0 auto;
	color: hsl(var(--muted-foreground));
	font-size: 1.125rem;
}

.caso-grid {
	display: grid;
	grid-template-columns: repeat(1, 1fr);
	gap: 2rem;
	padding: 4rem 0 6rem;
}

@media (min-width: 768px) {
	.caso-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.caso-card {
	position: relative;
	display: block;
	border-radius: calc(var(--radius) * 2);
	overflow: hidden;
	background: hsl(var(--card));
	box-shadow: var(--shadow-md);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.caso-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

.caso-card__image {
	aspect-ratio: 4 / 3;
	width: 100%;
	object-fit: cover;
}

.caso-card__body {
	padding: 1.5rem;
}

.caso-card__categoria {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: hsl(var(--primary));
	margin-bottom: 0.5rem;
	display: block;
}

.caso-card__title {
	font-size: 1.375rem;
	margin: 0;
}

/* ---------- Single case study ---------- */

.caso-single__hero {
	padding: 4rem 0 2rem;
}

.caso-single__title {
	font-size: clamp(2.25rem, 4vw, 3.5rem);
	max-width: 44rem;
}

.caso-single__cover {
	width: 100%;
	max-height: 32rem;
	object-fit: cover;
	border-radius: calc(var(--radius) * 2);
	margin: 2rem 0;
}

.caso-single__section {
	max-width: 44rem;
	margin: 0 auto 3rem;
}

.caso-single__section h2 {
	font-size: 1.75rem;
	margin-bottom: 0.75rem;
}

.caso-single__section .content {
	color: hsl(var(--foreground));
	line-height: 1.7;
}

/* Richer than the rule above alone needs to be for the short Desafio/
   Solução/Resultados fields — this also covers the_content()'s output on
   a full blog article (single.php): headings, lists, images, quotes. */
.caso-single__section .content p {
	margin: 0 0 1.25rem;
}

.caso-single__section .content h2,
.caso-single__section .content h3 {
	margin-top: 2rem;
}

.caso-single__section .content ul,
.caso-single__section .content ol {
	margin: 0 0 1.25rem;
	padding-left: 1.5rem;
}

.caso-single__section .content li {
	margin-bottom: 0.5rem;
}

.caso-single__section .content img {
	border-radius: var(--radius);
	margin: 1.5rem 0;
}

.caso-single__section .content blockquote {
	margin: 1.5rem 0;
	padding-left: 1.25rem;
	border-left: 3px solid hsl(var(--primary));
	font-style: italic;
	color: hsl(var(--muted-foreground));
}

.caso-single__section .content a {
	color: hsl(var(--primary));
	text-decoration: underline;
}

.caso-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
	max-width: 56rem;
	margin: 0 auto 4rem;
}

@media (min-width: 768px) {
	.caso-gallery {
		grid-template-columns: repeat(3, 1fr);
	}
}

.caso-gallery img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--radius);
	cursor: zoom-in;
	transition: opacity 0.2s ease;
}

.caso-gallery img:hover {
	opacity: 0.85;
}

.caso-cta {
	background: hsl(var(--ink));
	color: hsl(var(--ink-foreground));
	text-align: center;
	padding: 4rem 0;
	margin-top: 2rem;
}

.caso-cta h2 {
	color: hsl(var(--ink-foreground));
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	max-width: 40rem;
	margin: 0 auto;
}

/* Lightbox opened by assets/js/gallery-lightbox.js */
.caso-lightbox {
	position: fixed;
	inset: 0;
	background: hsl(var(--ink) / 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999;
	padding: 2rem;
}

.caso-lightbox[hidden] {
	display: none;
}

.caso-lightbox img {
	max-width: 100%;
	max-height: 100%;
	border-radius: var(--radius);
}

/* ---------- Footer ---------- */

.site-footer {
	background: hsl(var(--ink));
	color: hsl(var(--ink-foreground));
	padding: 4rem 0;
	margin-top: 2rem;
}

.site-footer a {
	color: hsl(var(--ink-muted));
	transition: color 0.15s ease;
}

.site-footer a:hover {
	color: hsl(var(--primary));
}

.site-footer__bottom {
	border-top: 1px solid hsl(var(--ink-border));
	margin-top: 3rem;
	padding-top: 2rem;
	text-align: center;
	font-size: 0.875rem;
	color: hsl(var(--ink-muted));
}
