/* ==========================================================
   AT Defensa Legal · base
   Paleta, tipografia, layout i peces comunes (botons, arcs, etiquetes)
   ========================================================== */

:root {
	/* Paleta */
	--terracota: #652A1F; /* principal */
	--ivori: #E9E3D9;     /* fons */
	--carbo: #222222;     /* textos i fons foscos */
	--bronze: #936350;    /* accent */
	--blanc: #F0EBE3;     /* blanc trencat */

	--linia: rgba(34, 34, 34, .16);
	--linia-clara: rgba(233, 227, 217, .2);

	/* Tipografia */
	--font-titol: "Lora", Georgia, serif;
	--font-text: "Lato", "Helvetica Neue", Arial, sans-serif;

	/* Layout */
	--max: 1320px;
	--gutter: clamp(16px, 4vw, 32px); /* marge lateral de les seccions */
	--radi: 10px;
	--header-height: 76px;
}

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

/* Text només per a lectors de pantalla */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* L'atribut hidden sempre amaga, encara que la classe tingui un display propi */
[hidden] {
	display: none !important;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-height) + 4px);
}

body {
	margin: 0;
	background: var(--ivori);
	color: var(--carbo);
	font-family: var(--font-text);
	font-weight: 400;
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1,
h2,
h3 {
	font-family: var(--font-titol);
	font-weight: 500;
	line-height: 1.12;
	margin: 0;
	color: var(--terracota);
}

h1,
h2 {
	text-transform: uppercase;
	letter-spacing: .02em;
}

p {
	margin: 0;
}

a {
	color: inherit;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

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

.wrap {
	width: 100%;
	max-width: calc(var(--max) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* Forma pròpia: arc de mig punt, com un portal clàssic */
.arch {
	border-radius: 999px 999px 0 0;
	object-fit: cover;
}

/* ---------- Títols i etiquetes ---------- */
.title {
	font-size: clamp(2rem, 3.8vw, 3rem);
	max-width: 18ch;
}

.label {
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--bronze);
	margin-bottom: 1.5rem;
}

.kicker {
	font-size: .78rem;
	font-weight: 400;
	letter-spacing: .24em;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
}

.kicker--light {
	color: var(--ivori);
	opacity: .9;
}

/* ---------- Monograma: inicials dins un cercle (equip sense foto) ---------- */
/* Es posa dins la caixa de la foto, que ja té el degradat bronze; la mida del cercle la fixa cada pàgina */
.monogram {
	container-type: inline-size;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	border: 1px solid rgba(233, 227, 217, .55);
	border-radius: 50%;
	color: var(--ivori);
	transition: transform .6s, border-color .6s;
}

/* Un segon cercle, més fi i a dins, per donar-li aire de segell */
.monogram::before {
	content: "";
	position: absolute;
	inset: 7%;
	border: 1px solid rgba(233, 227, 217, .18);
	border-radius: 50%;
}

.monogram__letters {
	font-family: var(--font-titol);
	font-weight: 400;
	font-size: 34cqi;
	line-height: 1;
	letter-spacing: .06em;
	padding-left: .06em; /* compensa el letter-spacing perquè quedin centrades */
}

/* ---------- Botons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 48px;
	padding: 13px 16px 13px 18px;
	font: 400 .9rem/1 var(--font-text);
	text-decoration: none;
	border: 0;
	border-radius: 3px;
	cursor: pointer;
	transition: background .25s, color .25s;
}

.btn--accent {
	background: var(--bronze);
	color: var(--ivori);
}

.btn--accent:hover {
	background: var(--terracota);
}

/* Sobre fons terracota el hover s'inverteix */
.hero .btn--accent:hover,
.footer .btn--accent:hover {
	background: var(--ivori);
	color: var(--terracota);
}

.arr {
	font-size: 1rem;
	line-height: 1;
}

/* Fletxes rodones dels carrusels */
.arrows {
	display: flex;
	gap: 10px;
}

.arrows__btn {
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--linia-clara);
	background: transparent;
	color: var(--ivori);
	font-size: .95rem;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.arrows__btn:hover {
	background: var(--ivori);
	color: var(--carbo);
}

.arrows--dark .arrows__btn {
	border-color: var(--linia);
	color: var(--carbo);
}

.arrows--dark .arrows__btn:hover {
	background: var(--carbo);
	color: var(--ivori);
}

/* Enllaç «Veure tots» de les capçaleres de secció (matèries, blog...) */
.link-all {
	display: inline-flex;
	gap: 12px;
	flex-shrink: 0;
	font-size: .9rem;
	font-weight: 400;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 4px;
	transition: color .2s;
}

.link-all span {
	transition: transform .3s;
}

.link-all:hover {
	color: var(--terracota);
}

.link-all:hover span {
	transform: translateX(3px);
}

/* Etiquetes arrodonides (hero...) */
.tags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.tags li {
	padding: 6px 14px;
	border: 1px solid var(--linia-clara);
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 700;
}

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