/* ============================================================
   Juan Díaz — Acuarela
   Hoja de estilos moderna (sustituye al template skel/bootstrap)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
	--bg: #f7f3ed;
	--bg-alt: #efe8de;
	--surface: #fffdf9;
	--ink: #1a1713;
	--muted: #6d6357;
	--line: #e3d9cb;
	--accent: #9a6b3f;
	--accent-soft: #c89b6a;
	--danger: #b4472f;
	--ok: #3f7d52;
	--radius: 14px;
	--shadow-sm: 0 1px 2px rgba(26, 23, 19, .06), 0 10px 26px -20px rgba(26, 23, 19, .45);
	--shadow-lg: 0 40px 80px -50px rgba(26, 23, 19, .6);
	--max: 1180px;
	--pad: clamp(20px, 4vw, 36px);
	--display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 96px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: clamp(16px, .5vw + 14.8px, 17.5px);
	font-weight: 350;
	line-height: 1.72;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
	font-family: var(--display);
	font-weight: 500;
	line-height: 1.14;
	letter-spacing: .005em;
	margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
h3 { font-size: clamp(1.15rem, 1.5vw, 1.4rem); }

p { margin: 0 0 1.15em; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.eyebrow {
	display: block;
	font-family: var(--body);
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 1.1em;
}

/* ---------- Cabecera ---------- */
#header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	color: #fff;
	transition: background .35s ease, box-shadow .35s ease, color .35s ease;
}

#header .container {
	max-width: var(--max);
	margin: 0 auto;
	padding: 16px var(--pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

#header.is-scrolled {
	background: rgba(247, 243, 237, .9);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	box-shadow: 0 1px 0 var(--line);
	color: var(--ink);
}

.brand {
	display: inline-flex;
	flex-direction: column;
	text-decoration: none;
	text-transform: uppercase;
	line-height: 1;
	flex: 0 0 auto;
}
.brand strong {
	font-family: var(--display);
	font-size: 1.3rem;
	font-weight: 600;
	letter-spacing: .13em;
}
.brand small {
	font-size: .58rem;
	letter-spacing: .34em;
	opacity: .68;
	margin-top: 5px;
}

/* ---------- Navegación ---------- */
#nav { display: flex; align-items: center; }

#nav > ul {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

#nav > ul > li { position: relative; }

#nav a {
	display: block;
	padding: 9px 13px;
	font-size: .72rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-decoration: none;
	opacity: .84;
	transition: opacity .2s ease;
}
#nav a:hover { opacity: 1; }

#nav > ul > li.active > a { opacity: 1; }
#nav > ul > li.active > a::after {
	content: "";
	display: block;
	height: 1px;
	margin-top: 5px;
	background: currentColor;
	opacity: .55;
}

#nav > ul > li > ul {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	list-style: none;
	margin: 10px 0 0;
	padding: 8px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: var(--shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
#nav > ul > li:hover > ul,
#nav > ul > li:focus-within > ul {
	opacity: 1;
	visibility: visible;
	transform: none;
}
#nav > ul > li > ul a {
	color: var(--ink);
	padding: 10px 12px;
	border-radius: 8px;
	letter-spacing: .1em;
}
#nav > ul > li > ul a:hover { background: var(--bg-alt); }

.nav-toggle {
	display: none;
	align-items: center;
	background: none;
	border: 1px solid currentColor;
	color: inherit;
	border-radius: 999px;
	padding: 10px 18px;
	font-family: var(--body);
	font-size: .68rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	cursor: pointer;
}

/* ---------- Hero ---------- */
.wrapper.style1 {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background: #15120f url("../images/cabecera.jpg") center / cover no-repeat;
}
.wrapper.style1::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(16, 13, 10, .62) 0%,
		rgba(16, 13, 10, .18) 42%,
		rgba(16, 13, 10, .86) 100%
	);
}

#banner {
	position: relative;
	z-index: 1;
	padding: clamp(120px, 18vh, 220px) 0 clamp(54px, 9vh, 108px);
}
#banner .container {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--pad);
	color: #fff;
}
#banner .eyebrow { color: rgba(255, 255, 255, .78); }
#banner span {
	display: block;
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(3.2rem, 10vw, 7.5rem);
	line-height: .92;
	letter-spacing: -.015em;
	margin: 0 0 .3em;
	text-wrap: balance;
}
#banner .hero-sub {
	max-width: 54ch;
	font-size: clamp(1rem, 1.2vw, 1.15rem);
	color: rgba(255, 255, 255, .84);
	margin-bottom: 0;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 34px;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 26px;
	border-radius: 999px;
	text-decoration: none;
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .18em;
	text-transform: uppercase;
	transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn-solid { background: var(--surface); color: var(--ink); }
.btn-solid:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }

/* ---------- Secciones ---------- */
.wrapper.style3 { background: var(--bg); padding: clamp(56px, 8vw, 110px) 0; }
.wrapper.style2 { background: var(--bg-alt); padding: clamp(56px, 8vw, 110px) 0; }

section.container {
	width: auto !important;
	max-width: var(--max);
	margin-inline: auto;
	padding-inline: var(--pad);
}

header.major { margin-bottom: clamp(28px, 4vw, 52px); }
header.major h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.1rem); }
header.major h1::after {
	content: "";
	display: block;
	width: 54px;
	height: 2px;
	margin-top: 18px;
	background: var(--accent);
}
.byline { display: block; margin-top: 14px; color: var(--muted); }

.wrapper p { max-width: 74ch; color: var(--muted); }

/* Capitular en el texto de presentación */
header.major + p::first-letter {
	float: left;
	font-family: var(--display);
	font-size: 3.6em;
	line-height: .82;
	padding: .06em .12em 0 0;
	color: var(--accent);
}

/* ---------- Rejillas ---------- */
.row { display: grid; gap: clamp(30px, 5vw, 64px); }
.row.double { grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr); align-items: start; }
.row.triple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.7u, .5u, .6u, .col-md-12 { min-width: 0; }

/* ---------- Biografía ---------- */
.style2 .7u > span {
	display: block;
	color: var(--muted);
	margin-bottom: 1.1em;
}
.style2 h2 { margin: 2.2rem 0 .6rem; }
.style2 .5u { position: sticky; top: 110px; }

#img-perfil {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
}

/* ---------- Galería (masonry que respeta las proporciones) ---------- */
#gallery {
	column-count: 4;
	column-gap: clamp(8px, 1vw, 14px);
}
#gallery .pics {
	break-inside: avoid;
	margin: 0 0 clamp(8px, 1vw, 14px);
	overflow: hidden;
	border-radius: 12px;
	background: var(--line);
	position: relative;
}
#gallery .pics a { display: block; cursor: zoom-in; }
#gallery .pics img {
	width: 100% !important;
	height: auto !important;
	max-width: none !important;
	max-height: none !important;
	transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}
#gallery .pics:hover img { transform: scale(1.045); }
#gallery .pics::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(20, 16, 12, 0);
	transition: background .4s ease;
	pointer-events: none;
}
#gallery .pics:hover::after { background: rgba(20, 16, 12, .12); }

/* ---------- Vídeos ---------- */
.videoWrapper { min-width: 0; }
.videoWrapper p { margin: 0; max-width: none; }
.videoWrapper iframe {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 12px;
	background: #000;
	box-shadow: var(--shadow-sm);
}

/* ---------- Catálogos ---------- */
.row.double[style] { padding-left: 0 !important; }
.row.double > ul {
	grid-column: 1 / -1;
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}
.row.double > ul li { min-width: 0; }
.row.double > ul li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 24px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	text-decoration: none;
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.row.double > ul li a:hover {
	transform: translateY(-2px);
	border-color: var(--accent-soft);
	box-shadow: var(--shadow-sm);
}
.row.double > ul li p {
	margin: 0;
	color: var(--ink);
	font-weight: 450;
	max-width: none;
}
.row.double > ul li a::after {
	content: "↗";
	color: var(--accent);
	font-size: 1.05rem;
	flex: 0 0 auto;
}

/* ---------- Críticas ---------- */
.wrapper p[style*="text-align:right"] {
	text-align: right !important;
	font-style: italic;
	color: var(--ink);
	opacity: .8;
}

/* ---------- Contacto ---------- */
#contact_form { max-width: 660px; }
#contact_form ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 18px;
}
#contact_form li { min-width: 0; }
#contact_form label {
	display: block;
	margin-bottom: 7px;
	font-size: .7rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--muted);
}
#contact_form input[type="text"],
#contact_form textarea {
	width: 100%;
	padding: 14px 16px;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	border: 1px solid var(--line);
	border-radius: 10px;
	transition: border-color .2s ease, box-shadow .2s ease;
}
#contact_form textarea { min-height: 170px; resize: vertical; }
#contact_form input:focus,
#contact_form textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(154, 107, 63, .16);
}

#contact_form .error {
	display: none;
	margin: 7px 0 0;
	font-size: .85rem;
	color: var(--danger);
	max-width: none;
}
#contact_form .error.is-visible { display: block; }
#contact_form .success {
	display: none;
	margin: 0;
	padding: 14px 18px;
	border-radius: 10px;
	background: rgba(63, 125, 82, .1);
	border: 1px solid rgba(63, 125, 82, .3);
	color: var(--ok);
	max-width: none;
}
#contact_form .success.is-visible { display: block; }

#send_message {
	width: auto;
	padding: 15px 34px;
	background: var(--ink);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-family: var(--body);
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .18em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .25s ease, transform .25s ease;
}
#send_message:hover:not(:disabled) { background: var(--accent); transform: translateY(-2px); }
#send_message:disabled { opacity: .6; cursor: progress; }

/* ---------- Pie ---------- */
.site-footer { background: #14110e; color: rgba(255, 255, 255, .72); padding: 54px 0; }
.site-footer .container {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 22px;
}
.footer-brand {
	margin: 0;
	font-family: var(--display);
	font-size: 1.4rem;
	color: #fff;
	letter-spacing: .04em;
}
.footer-brand span { color: var(--accent-soft); font-size: .9rem; }
.footer-meta {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 26px;
	font-size: .82rem;
	max-width: none;
	color: inherit;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-top {
	text-decoration: none;
	font-size: .72rem;
	letter-spacing: .18em;
	text-transform: uppercase;
}
.footer-top:hover { color: #fff; }

/* ---------- Visor de imágenes ---------- */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 56px);
	background: rgba(12, 10, 8, .95);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
	max-width: min(1200px, 92vw);
	max-height: 82vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 40px 90px rgba(0, 0, 0, .55);
}
.lightbox button {
	position: absolute;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .2);
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }
#lightbox-caption {
	position: absolute;
	bottom: 20px;
	left: 0;
	right: 0;
	margin: 0;
	text-align: center;
	font-size: .7rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .6);
	max-width: none;
}
body.no-scroll { overflow: hidden; }

/* ---------- Animación de entrada ---------- */
.reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .8s ease, transform .8s ease;
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	#gallery { column-count: 3; }
}

@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; }

	#nav {
		display: block;
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		width: min(330px, 86vw);
		padding: 96px 26px 32px;
		background: var(--bg);
		color: var(--ink);
		box-shadow: var(--shadow-lg);
		transform: translateX(104%);
		transition: transform .38s cubic-bezier(.2, .8, .2, 1);
		overflow-y: auto;
	}
	#nav.is-open { transform: none; }
	#nav > ul { flex-direction: column; align-items: stretch; gap: 4px; }
	#nav > ul > li > ul {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		background: none;
		border: 0;
		box-shadow: none;
		margin: 0;
		padding: 0 0 6px 16px;
	}
	#nav a { padding: 12px 10px; }

	.row.double { grid-template-columns: 1fr; }
	.style2 .5u { position: static; }
	#banner span { font-size: clamp(3rem, 15vw, 5rem); }
}

@media (max-width: 680px) {
	#gallery { column-count: 2; }
	.row.triple { grid-template-columns: 1fr; }
	.site-footer .container { flex-direction: column; align-items: flex-start; }
	.hero-actions { gap: 10px; }
	.btn { padding: 13px 20px; }
}

/* ---------- Preferencias de movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .001ms !important;
		transition-duration: .001ms !important;
	}
	.reveal { opacity: 1; transform: none; }
}
