/* Rosilia — estilos base
   Paleta: girasol (del logo), tinta, manteca, blanco; hilo índigo solo para costuras y foco. */
:root {
	--girasol: #f1cc0a;
	--girasol-hondo: #d4b000;
	--manteca: #fff7d1;
	--tinta: #1c1a16;
	--tinta-suave: #4a463d;
	--gris: #6b665b;
	--blanco: #ffffff;
	--hilo: #26427c;
	--linea: #e8e2cf;

	--serif: 'Young Serif', Georgia, 'Times New Roman', serif;
	--sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--ancho: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--r-chico: 6px;
	--r: 12px;
	--sombra-quilt: 10px 10px 0 var(--girasol-hondo);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--blanco);
	color: var(--tinta);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--hilo); outline-offset: 3px; border-radius: 3px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--tinta); color: var(--blanco); padding: .6rem 1rem; border-radius: var(--r-chico); }
.saltar:focus { top: 12px; }

/* ---------- Botones ---------- */
.boton {
	display: inline-flex; align-items: center; justify-content: center; gap: .55em;
	min-height: 48px; padding: .75rem 1.5rem;
	border: 2px solid var(--tinta); border-radius: 999px;
	background: var(--girasol); color: var(--tinta);
	font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
	transition: background-color .15s, color .15s, transform .15s;
}
.boton svg { width: 1.25em; height: 1.25em; flex: none; }
.boton:hover { transform: translateY(-1px); }
.boton:active { transform: translateY(0); }
.boton--negro { background: var(--tinta); color: var(--blanco); }
.boton--negro:hover { background: #000; }
.boton--linea { background: transparent; }
.boton--linea:hover { background: var(--tinta); color: var(--blanco); }

.enlace { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; }
.enlace svg { width: 1.3em; height: 1.3em; }

/* ---------- Cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 50; background: var(--blanco); border-bottom: 1px solid var(--linea); }
.cabecera--portada { background: var(--girasol); border-bottom-color: transparent; }
.cabecera__in { max-width: var(--ancho); margin: 0 auto; padding: .9rem var(--gutter); display: flex; align-items: center; gap: 2rem; }
.marca img { width: 150px; height: auto; }
.nav { margin-left: auto; }
.nav .menu { list-style: none; display: flex; gap: 1.6rem; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 500; font-size: .98rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav .current-menu-item > a { border-bottom-color: currentColor; }
.acciones { display: flex; align-items: center; gap: .25rem; }
.icono-btn {
	position: relative; display: inline-grid; place-items: center;
	width: 44px; height: 44px; border: 0; border-radius: 50%;
	background: transparent; color: var(--tinta); cursor: pointer;
}
.icono-btn:hover { background: rgba(28, 26, 22, .08); }
.icono-btn svg { width: 24px; height: 24px; }
.carrito__n {
	position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px;
	border-radius: 999px; background: var(--tinta); color: var(--blanco);
	font-size: .72rem; font-weight: 700; line-height: 19px; text-align: center;
}
.cabecera:not(.cabecera--portada) .carrito__n { background: var(--girasol); color: var(--tinta); }
.menu-btn { display: none; }

.buscador { border-top: 1px solid rgba(28, 26, 22, .12); background: inherit; }
.buscador form { max-width: var(--ancho); margin: 0 auto; padding: 1rem var(--gutter); display: flex; gap: .6rem; }
.buscador input[type=search] {
	flex: 1; min-width: 0; min-height: 48px; padding: .6rem 1.1rem;
	border: 2px solid var(--tinta); border-radius: 999px; background: var(--blanco);
	font: inherit; color: inherit;
}

/* ---------- Portada: el quilt ---------- */
.portada { background: var(--girasol); }
.portada__in {
	max-width: var(--ancho); margin: 0 auto;
	padding: clamp(2rem, 5vw, 4.5rem) var(--gutter) clamp(2.5rem, 5vw, 4rem);
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.portada__lugar { font-weight: 600; font-size: 1rem; margin-bottom: 1.2rem; }
.portada h1 { font-size: clamp(2.8rem, 6.4vw, 5.6rem); line-height: .98; letter-spacing: -.025em; margin-bottom: 1.5rem; max-width: 9ch; }
.portada__bajada { font-size: 1.15rem; max-width: 40ch; color: var(--tinta-suave); margin-bottom: 2rem; }
.portada__botones { display: flex; flex-wrap: wrap; gap: .75rem; }

.quilt {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(4, 1fr);
	grid-template-areas:
		"a a b c"
		"a a d d"
		"e f f g"
		"h f f i";
	gap: 5px;
	aspect-ratio: 1;
	padding: 5px;
	background: var(--tinta);              /* ribete del quilt */
	border-radius: var(--r);
	box-shadow: var(--sombra-quilt);
}
.retazo { position: relative; overflow: hidden; border-radius: 3px; background: var(--manteca); }
.retazo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.retazo::after {                           /* puntada a mano alrededor de cada retazo */
	content: ""; position: absolute; inset: 7px;
	border: 1.5px dashed rgba(255, 255, 255, .85); border-radius: 2px;
	pointer-events: none;
}
.retazo:hover img { transform: scale(1.06); }
.retazo:focus-visible { outline-offset: -4px; outline-color: var(--girasol); }
.retazo--1 { grid-area: a; } .retazo--2 { grid-area: b; } .retazo--3 { grid-area: c; }
.retazo--4 { grid-area: d; } .retazo--5 { grid-area: e; } .retazo--6 { grid-area: f; }
.retazo--7 { grid-area: g; } .retazo--8 { grid-area: h; } .retazo--9 { grid-area: i; }

/* Único momento animado: los retazos se "cosen" uno tras otro al cargar */
@media (prefers-reduced-motion: no-preference) {
	.retazo { animation: coser .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 70ms + 120ms); }
	.retazo::after { animation: puntada .6s ease both; animation-delay: calc(var(--i) * 70ms + 420ms); }
	@keyframes coser { from { opacity: 0; transform: scale(.92); } }
	@keyframes puntada { from { opacity: 0; inset: 16px; } }
}

/* Costura: dobladillo entre el amarillo y el blanco */
.costura { height: 22px; background: var(--girasol); position: relative; }
.costura::before {
	content: ""; position: absolute; left: 0; right: 0; top: 4px;
	border-top: 2px dashed rgba(28, 26, 22, .55);
}

/* ---------- Promesas ---------- */
.promesas ul {
	list-style: none; margin: 0 auto; max-width: var(--ancho);
	padding: clamp(2rem, 4vw, 3rem) var(--gutter);
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.promesas strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; margin-bottom: .3rem; }
.promesas span { color: var(--gris); font-size: .98rem; display: block; max-width: 36ch; }

/* ---------- Secciones ---------- */
.seccion { max-width: var(--ancho); margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) var(--gutter); }
.seccion__cabeza { max-width: 60ch; margin-bottom: clamp(1.8rem, 3vw, 2.6rem); }
.seccion__cabeza h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: .35em; }
.seccion__cabeza p { color: var(--gris); margin: 0; font-size: 1.08rem; }
.seccion__pie { margin: 2.5rem 0 0; }
.categorias { padding-top: clamp(1rem, 3vw, 2rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.cat-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(.8rem, 1.6vw, 1.4rem); }
.cat { display: block; text-decoration: none; }
.cat__foto { display: block; aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: var(--manteca); margin-bottom: .7rem; }
.cat__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat:hover .cat__foto img { transform: scale(1.05); }
.cat__nombre { display: block; font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; }
.cat:hover .cat__nombre { text-decoration: underline; text-decoration-thickness: 2px; }
.cat__n { display: block; color: var(--gris); font-size: .9rem; }

/* ---------- Historia ---------- */
.historia { background: var(--manteca); }
.historia__in {
	max-width: var(--ancho); margin: 0 auto; padding: clamp(3.5rem, 7vw, 6.5rem) var(--gutter);
	display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.historia__foto { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; background: var(--girasol); }
.historia__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.historia__foto::after { content: ""; position: absolute; inset: 12px; border: 2px dashed rgba(255, 255, 255, .9); border-radius: 6px; pointer-events: none; }
.historia__texto h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: .2em; }
.historia__frase { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.35; color: var(--tinta-suave); margin-bottom: 1.2rem; max-width: 30ch; }
.historia__texto > p { max-width: 58ch; }
.proceso { list-style: none; counter-reset: paso; margin: 2rem 0; padding: 0; display: grid; gap: 1rem; }
.proceso li { counter-increment: paso; position: relative; padding: .45rem 0 0 3.4rem; min-height: 2.4rem; max-width: 54ch; }
.proceso li::before {
	content: counter(paso); position: absolute; left: 0; top: 0;
	display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
	background: var(--girasol); border: 1.5px dashed var(--tinta);
	font-family: var(--serif); font-size: 1.05rem; line-height: 1;
}

/* ---------- Preguntas ---------- */
.preguntas { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.faq details { border-bottom: 2px dashed var(--linea); }
.faq details:first-child { border-top: 2px dashed var(--linea); }
.faq summary {
	list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
	padding: 1.2rem 0; font-weight: 600; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 1.6rem; line-height: 1; transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.3rem; color: var(--tinta-suave); max-width: 62ch; }

/* ---------- Llamado ---------- */
.llamado { background: var(--girasol); }
.llamado__in { max-width: 820px; margin: 0 auto; padding: clamp(3.5rem, 7vw, 5.5rem) var(--gutter); text-align: center; }
.llamado h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
.llamado p { font-size: 1.12rem; color: var(--tinta-suave); margin-bottom: 1.8rem; }

/* ---------- Pie ---------- */
.pie { background: var(--tinta); color: #e9e4d6; }
.pie__in {
	max-width: var(--ancho); margin: 0 auto; padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) 2.5rem;
	display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
}
.pie__marca img { width: 170px; margin-bottom: 1.2rem; }
.pie__marca p { max-width: 42ch; color: #bdb7a8; }
.pie h2 { font-family: var(--sans); font-weight: 700; font-size: 1rem; color: var(--girasol); margin-bottom: 1rem; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.pie a { text-decoration: none; }
.pie a:hover { text-decoration: underline; }
.contacto a { display: inline-flex; align-items: center; gap: .6rem; }
.contacto svg { width: 20px; height: 20px; color: var(--girasol); }
.pie__nota { color: #bdb7a8; font-size: .95rem; margin-top: 1rem; }
.pie__base { border-top: 1px dashed rgba(255, 255, 255, .2); }
.pie__base p { max-width: var(--ancho); margin: 0 auto; padding: 1.2rem var(--gutter); font-size: .9rem; color: #9d978a; }

/* ---------- WhatsApp flotante ---------- */
.wa-flotante {
	position: fixed; right: 18px; bottom: 18px; z-index: 40;
	width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
	background: var(--tinta); color: var(--girasol);
	box-shadow: 0 0 0 3px var(--girasol), 0 6px 18px rgba(0, 0, 0, .25);
}
.wa-flotante svg { width: 30px; height: 30px; }
.wa-flotante:hover { transform: scale(1.05); }

/* ---------- Páginas genéricas ---------- */
.envoltorio { max-width: var(--ancho); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(3rem, 6vw, 5rem); }
.envoltorio--angosto { max-width: 720px; }
.titulo-pagina { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1.5rem; }
.contenido__cuerpo { max-width: 72ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.cat-lista { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
	.menu-btn { display: inline-grid; }
	.cabecera__in { gap: 1rem; }
	.marca img { width: 124px; }
	.acciones { margin-left: auto; }
	.nav {
		position: absolute; left: 0; right: 0; top: 100%;
		background: inherit; border-top: 1px solid rgba(28, 26, 22, .12);
		display: none; margin: 0;
	}
	.cabecera { background: var(--blanco); }
	.cabecera--portada { background: var(--girasol); }
	.nav.abierto { display: block; background: inherit; }
	.cabecera .nav { background-color: var(--blanco); }
	.cabecera--portada .nav { background-color: var(--girasol); }
	.nav .menu { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.2rem; }
	.nav a { display: block; padding: .85rem 0; font-size: 1.1rem; border-bottom: 1px solid rgba(28, 26, 22, .1); }

	.portada__in { grid-template-columns: 1fr; }
	.portada h1 { max-width: 11ch; }
	.quilt { max-width: 560px; width: 100%; }
	.promesas ul { grid-template-columns: 1fr; gap: 1.3rem; }
	.historia__in, .preguntas { grid-template-columns: 1fr; }
	.historia__foto { max-width: 480px; aspect-ratio: 1; }
	.pie__in { grid-template-columns: 1fr 1fr; }
	.pie__marca { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	body { font-size: 1rem; }
	.cat-lista { grid-template-columns: repeat(2, 1fr); }
	.portada__botones .boton { flex: 1 1 100%; }
	.quilt { --sombra-quilt: 6px 6px 0 var(--girasol-hondo); gap: 4px; padding: 4px; }
	.retazo::after { inset: 5px; }
	.pie__in { grid-template-columns: 1fr; }
	.wa-flotante { width: 52px; height: 52px; right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
