/* ============================================================
   Roca Roja 3D v2 - Estilo curated.media con paleta Roca Roja
   ============================================================
   Glassmorphism, glow lines, loader, canvas unificado, responsive.
   No sobrescribe estilos del tema padre; solo anade utilidades.
   ============================================================ */

:root {
	--rr-wine:        #7d0808;
	--rr-wine-light:  #a01010;
	--rr-violet:      #896160;
	--rr-primary:     #1a4548;
	--rr-cream:       #ffe2c7;
	--rr-blue:        #066aab;
	--rr-dark:        #1a0f0f;
	--rr-dark-deep:   #0d0b14;
	--rr-glass-blur:  16px;
	--rr-glass-bg:    rgba(125,8,8,0.12);
	--rr-glass-bg-dark: rgba(26,15,15,0.7);
	--rr-glass-border: 1px solid rgba(255,226,199,0.15);
	--rr-glass-radius: 10px;
	--rr-glass-shadow: inset 0 1px 0 rgba(255,226,199,0.35), inset 0 -1px 0 rgba(0,0,0,0.35);
	--rr-glow:        0 0 6px rgba(125,8,8,0.8);
	--rr-glow-cream:  0 0 6px rgba(255,226,199,0.6);
	--rr-canvas-z:    0;
}

/* ---- Reset body para fondo oscuro ---- */
body {
	background: var(--rr-dark);
	color: var(--rr-cream);
	position: relative;
	z-index: 1;
}

/* Fondo con gradiente sutil de vino para todo el sitio */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -1;
	background: radial-gradient(ellipse at 50% 0%, rgba(125,8,8,0.12) 0%, transparent 60%);
	pointer-events: none;
}

/* Asegura contraste del texto sobre fondo oscuro */
.wp-site-blocks,
.wp-block-group,
.wp-block-cover,
main,
header,
footer {
	color: var(--rr-cream);
}

/* Enlaces heredan cream */
a { color: var(--rr-cream); }

/* ---- Canvas 3D unificado de fondo ---- */
#rr-canvas-scene {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	z-index: 0;
	pointer-events: none;
}

/* Contenido del sitio por encima del canvas */
.wp-site-blocks {
	position: relative;
	z-index: 2;
}

/* ---- LOADER inicial ---- */
@keyframes rr-rotation {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

@keyframes rr-smoothRoll {
	0%, 20%   { transform: translateY(0); }
	25%, 45%  { transform: translateY(-25%); }
	50%, 70%  { transform: translateY(-50%); }
	75%, 95%  { transform: translateY(-75%); }
	100%      { transform: translateY(0); }
}

#rr-loader .rr-loader-spinner {
	width: 60px;
	height: 60px;
	border: 4px dotted var(--rr-cream);
	border-radius: 50%;
	animation: rr-rotation 3.5s linear infinite;
	margin-bottom: 2rem;
}

@media (max-width: 480px) {
	#rr-loader .rr-loader-spinner {
		width: 48px;
		height: 48px;
		animation-duration: 2s;
	}
}

.rr-loader-roll {
	height: 1.5em;
	overflow: hidden;
	font-family: 'Inter', sans-serif;
	font-weight: 300;
	font-size: 1rem;
	text-align: center;
}

.rr-loader-roll-inner {
	animation: rr-smoothRoll 12s infinite ease-in-out;
}

.rr-loader-roll-inner > div {
	height: 1.5em;
	line-height: 1.5em;
}

/* ---- GLASSMORPHISM ---- */
.rr-glass {
	background: var(--rr-glass-bg);
	backdrop-filter: blur(var(--rr-glass-blur));
	-webkit-backdrop-filter: blur(var(--rr-glass-blur));
	border: var(--rr-glass-border);
	border-radius: var(--rr-glass-radius);
	box-shadow: var(--rr-glass-shadow);
}

.rr-glass-dark {
	background: var(--rr-glass-bg-dark);
	backdrop-filter: blur(var(--rr-glass-blur));
	-webkit-backdrop-filter: blur(var(--rr-glass-blur));
	border: var(--rr-glass-border);
	border-radius: var(--rr-glass-radius);
	box-shadow: var(--rr-glass-shadow);
}

/* Fallback si no hay backdrop-filter */
@supports not (backdrop-filter: blur(16px)) {
	.rr-glass { background: rgba(13,11,20,0.85); }
	.rr-glass-dark { background: rgba(13,11,20,0.92); }
}

/* ---- GLOW ---- */
.rr-glow {
	box-shadow: var(--rr-glow);
}

.rr-glow-cream {
	box-shadow: var(--rr-glow-cream);
}

/* ---- BOTONES ---- */
.rr-btn {
	display: inline-block;
	padding: 0.9rem 2rem;
	border-radius: 10px;
	font-family: 'Inter', sans-serif;
	font-weight: 500;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	cursor: pointer;
}

.rr-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 20px rgba(125,8,8,0.5);
}

.rr-glass-btn {
	background: rgba(255,226,199,0.08);
	color: var(--rr-cream);
	border: 1px solid rgba(255,226,199,0.15);
	backdrop-filter: blur(var(--rr-glass-blur));
}

.rr-glass-btn:hover {
	background: rgba(255,226,199,0.15);
}

/* ---- HEADER glass ---- */
.rr-header-glass {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: var(--rr-glass-bg-dark);
	backdrop-filter: blur(var(--rr-glass-blur));
	-webkit-backdrop-filter: blur(var(--rr-glass-blur));
	border-bottom: 1px solid rgba(255,226,199,0.15);
}

.rr-header-glass .wp-block-site-title a {
	color: var(--rr-cream) !important;
	text-decoration: none;
}

.rr-header-glass .wp-block-navigation a {
	color: var(--rr-cream) !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 0.9rem !important;
	text-decoration: none;
	opacity: 0.85;
	transition: opacity 0.2s ease;
}

.rr-header-glass .wp-block-navigation a:hover {
	opacity: 1;
	color: var(--rr-wine) !important;
}

/* ---- FOOTER glass ---- */
.rr-footer-glass {
	background: var(--rr-glass-bg-dark);
	backdrop-filter: blur(var(--rr-glass-blur));
	-webkit-backdrop-filter: blur(var(--rr-glass-blur));
	border-top: 1px solid rgba(255,226,199,0.15);
	position: relative;
	overflow: hidden;
}

.rr-footer-glass a {
	color: var(--rr-cream) !important;
	opacity: 0.7;
	text-decoration: none;
}

.rr-footer-glass a:hover { opacity: 1; }

/* ---- HERO ---- */
.rr-hero {
	position: relative;
	width: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 2rem;
	text-align: center;
	overflow: hidden;
	isolation: isolate;
}

.rr-hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.rr-hero-content {
	position: relative;
	z-index: 2;
	max-width: 900px;
	padding: 3rem 2.5rem;
	border-radius: 16px;
	background: rgba(13,11,20,0.12) !important;
	backdrop-filter: blur(4px) !important;
	-webkit-backdrop-filter: blur(4px) !important;
	border: 1px solid rgba(255,226,199,0.08) !important;
	box-shadow: inset 0 1px 0 rgba(255,226,199,0.15), inset 0 -1px 0 rgba(0,0,0,0.25) !important;
}

/* Objetos 3D decorativos alrededor del hero text */
.rr-hero-orbits {
	position: absolute;
	inset: -60px;
	z-index: 0;
	pointer-events: none;
	perspective: 800px;
}

.rr-orbit-ring {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 280px;
	height: 280px;
	margin: -140px 0 0 -140px;
	border: 1px solid rgba(125,8,8,0.2);
	border-radius: 50%;
	transform-style: preserve-3d;
	animation: rr-orbit-spin 20s linear infinite;
	box-shadow: 0 0 30px rgba(125,8,8,0.05), inset 0 0 30px rgba(125,8,8,0.05);
}

.rr-orbit-ring:nth-child(2) {
	width: 200px;
	height: 200px;
	margin: -100px 0 0 -100px;
	border-color: rgba(137,97,96,0.15);
	animation-duration: 14s;
	animation-direction: reverse;
}

.rr-orbit-ring:nth-child(3) {
	width: 360px;
	height: 360px;
	margin: -180px 0 0 -180px;
	border-color: rgba(255,226,199,0.08);
	animation-duration: 26s;
}

.rr-orbit-dot {
	position: absolute;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #7d0808;
	box-shadow: 0 0 10px rgba(125,8,8,0.6);
	top: -3px;
	left: 50%;
	margin-left: -3px;
}

.rr-orbit-dot:nth-child(2) { top: 50%; left: auto; right: -3px; margin-left: 0; }
.rr-orbit-dot:nth-child(3) { top: auto; bottom: -3px; left: 50%; margin-left: -3px; }
.rr-orbit-dot:nth-child(4) { top: 50%; left: -3px; margin-left: 0; }

.rr-orbit-dot-sm {
	position: absolute;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: rgba(255,226,199,0.4);
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	box-shadow: 0 0 8px rgba(255,226,199,0.2);
}

@keyframes rr-orbit-spin {
	0%   { transform: rotateX(60deg) rotateZ(0deg); }
	100% { transform: rotateX(60deg) rotateZ(360deg); }
}

/* Tetraedro 3D flotante pequeño decorativo */
.rr-float-tetra {
	position: absolute;
	width: 0;
	height: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0.25;
	animation: rr-tetra-float 6s ease-in-out infinite;
}

.rr-float-tetra-1 {
	bottom: 10%;
	right: -20px;
	animation-delay: 0s;
}
.rr-float-tetra-2 {
	top: 15%;
	left: -30px;
	animation-delay: 2s;
}

@keyframes rr-tetra-float {
	0%, 100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.2; }
	50%      { transform: translateY(-15px) rotate(180deg) scale(1.3); opacity: 0.4; }
}

@media (max-width: 768px) {
	.rr-hero-content {
		padding: 2rem 1.5rem !important;
	}
	.rr-orbit-ring {
		width: 180px;
		height: 180px;
		margin: -90px 0 0 -90px;
	}
	.rr-orbit-ring:nth-child(2) {
		width: 130px;
		height: 130px;
		margin: -65px 0 0 -65px;
	}
	.rr-orbit-ring:nth-child(3) {
		width: 240px;
		height: 240px;
		margin: -120px 0 0 -120px;
	}
	.rr-float-tetra { display: none; }
}

.rr-eyebrow {
	font-family: 'Inter', sans-serif;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: 0.85rem;
	color: var(--rr-wine);
	margin: 0 0 1rem 0;
}

.rr-hero-title {
	font-family: 'Source Serif Pro', serif;
	font-weight: 300;
	font-size: clamp(2.5rem, 7vw, 5rem);
	line-height: 1.05;
	margin: 0 0 1.5rem 0;
	color: var(--rr-cream);
	text-shadow: 0 2px 30px rgba(125,8,8,0.5);
}

.rr-hero-sub {
	font-family: 'Source Serif Pro', serif;
	font-style: italic;
	font-size: clamp(1.1rem, 2.5vw, 1.6rem);
	line-height: 1.5;
	margin: 0 0 2.5rem 0;
	color: var(--rr-cream);
	opacity: 0.92;
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.rr-hero-ctas {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

.rr-scroll-hint {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	color: var(--rr-cream);
	opacity: 0.6;
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	animation: rr-bounce 2s infinite ease-in-out;
}

@keyframes rr-bounce {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50%      { transform: translateX(-50%) translateY(8px); }
}

/* ---- SECCIONES glass ---- */
.rr-section {
	max-width: 1000px;
	margin: 4rem auto;
	padding: 2.5rem;
	border-radius: 16px;
	position: relative;
	overflow: hidden;
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, background 0.4s ease;
	will-change: transform;
}

.rr-section:hover {
	transform: translateY(-6px) scale(1.01);
	box-shadow: inset 0 1px 0 rgba(255,226,199,0.5), inset 0 -1px 0 rgba(0,0,0,0.4), 0 8px 40px rgba(125,8,8,0.25);
	background: rgba(125,8,8,0.14);
}

.rr-section h2 {
	font-family: 'Source Serif Pro', serif;
	font-weight: 300;
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 1.1;
	margin: 0 0 1rem 0;
	color: var(--rr-cream);
}

.rr-section p {
	font-family: 'Inter', sans-serif;
	font-size: 1.1rem;
	line-height: 1.6;
	color: var(--rr-cream);
	opacity: 0.85;
	max-width: 700px;
	margin: 0;
}

.rr-section ul {
	font-family: 'Inter', sans-serif;
	font-size: 0.95rem;
	line-height: 1.8;
	color: var(--rr-cream);
	opacity: 0.75;
	list-style: none;
	padding: 0;
	margin: 0;
}

.rr-section li {
	padding-left: 1.5rem;
	position: relative;
}

.rr-section li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.7em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--rr-wine);
	box-shadow: 0 0 6px rgba(125,8,8,0.6);
}

/* ---- PROCESO grid ---- */
.rr-process {
	max-width: 1100px;
	margin: 6rem auto;
	padding: 0 2rem;
}

.rr-process-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
}

.rr-process-step {
	padding: 2rem 1.5rem;
	border-radius: 12px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	will-change: transform;
}

.rr-process-step:hover {
	transform: translateY(-4px);
	box-shadow: inset 0 1px 0 rgba(255,226,199,0.4), inset 0 -1px 0 rgba(0,0,0,0.35), 0 6px 30px rgba(125,8,8,0.2);
}

.rr-process-step h3 {
	font-family: 'Source Serif Pro', serif;
	font-weight: 300;
	font-size: 1.4rem;
	color: var(--rr-cream);
	margin: 0 0 0.5rem 0;
}

/* ---- CTA section ---- */
.rr-cta-section {
	max-width: 800px;
	margin: 6rem auto;
	padding: 3rem;
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(125,8,8,0.15) 0%, rgba(26,69,72,0.1) 100%);
	backdrop-filter: blur(var(--rr-glass-blur));
	-webkit-backdrop-filter: blur(var(--rr-glass-blur));
	border: 1px solid rgba(255,226,199,0.15);
	box-shadow: var(--rr-glass-shadow), 0 0 40px rgba(125,8,8,0.3);
	position: relative;
	overflow: hidden;
	text-align: center;
}

/* ---- TEAM / VALUES ---- */
.rr-team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.rr-team-card {
	padding: 2rem;
	border-radius: 12px;
	text-align: center;
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	will-change: transform;
}

.rr-team-card:hover {
	transform: translateY(-6px) scale(1.02);
	box-shadow: inset 0 1px 0 rgba(255,226,199,0.5), inset 0 -1px 0 rgba(0,0,0,0.4), 0 8px 40px rgba(125,8,8,0.25);
}

.rr-values-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
}

.rr-values-grid > .rr-glass {
	padding: 1.5rem;
	border-radius: 12px;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rr-values-grid > .rr-glass:hover {
	transform: translateY(-4px);
	box-shadow: inset 0 1px 0 rgba(255,226,199,0.4), inset 0 -1px 0 rgba(0,0,0,0.35), 0 6px 30px rgba(125,8,8,0.2);
}

/* ---- PORTAFOLIO 3D ---- */
.rr-portfolio-3d {
	position: relative;
	width: 100%;
	min-height: 70vh;
	overflow: hidden;
	background: rgba(13,11,20,0.4);
	border-radius: 12px;
	margin: 2rem 0;
	isolation: isolate;
}

.rr-portfolio-3d canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

.rr-portfolio-overlay {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-height: 70vh;
	padding: 2rem;
	color: var(--rr-cream);
	pointer-events: none;
}

.rr-portfolio-hint {
	font-family: 'Source Serif Pro', serif;
	font-style: italic;
	opacity: 0.8;
}

/* ---- PORTAFOLIO cards (grid de proyectos) ---- */
.rr-portfolio-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	max-width: 1100px;
	margin: 4rem auto;
	padding: 0 2rem;
}

.rr-portfolio-card {
	padding: 2rem;
	border-radius: 12px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	will-change: transform;
}

.rr-portfolio-card:hover {
	transform: translateY(-4px);
	box-shadow: inset 0 1px 0 rgba(255,226,199,0.4), inset 0 -1px 0 rgba(0,0,0,0.35), 0 6px 30px rgba(125,8,8,0.2);
}

.rr-portfolio-card h3 {
	font-family: 'Source Serif Pro', serif;
	font-weight: 300;
	font-size: 1.5rem;
	color: var(--rr-cream);
	margin: 0 0 0.75rem 0;
}

.rr-portfolio-intro {
	max-width: 1000px;
	margin: 3rem auto;
	padding: 2rem;
	text-align: center;
}

/* Video nativo de portafolio con estilo glass */
.wp-block-video video {
	border-radius: 12px;
	border: 1px solid rgba(255,226,199,0.15);
	box-shadow: 0 4px 30px rgba(125,8,8,0.2);
}

.rr-portfolio-card p {
	font-family: 'Inter', sans-serif;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--rr-cream);
	opacity: 0.75;
	margin: 0;
}

/* ---- SERVICIOS (iconos 3D) ---- */
.rr-3d-icon {
	perspective: 800px;
	border-radius: 12px;
	overflow: hidden;
}

.rr-3d-icon img {
	transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
	will-change: transform;
}

.rr-3d-icon:hover img {
	transform: rotateY(25deg) rotateX(-10deg) scale(1.05);
}

/* ---- TEAM (tilt 3D) ---- */
.rr-3d-team-card {
	perspective: 1000px;
	transition: transform 0.4s ease;
	will-change: transform;
	border-radius: 12px;
	overflow: hidden;
}

.rr-3d-team-card img {
	transition: transform 0.4s ease;
}

/* ---- CONTACTO (shader detras del form) ---- */
#rr-canvas-contact {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	pointer-events: none;
	border-radius: 25px;
}

/* ---- Atribucion CC-BY ---- */
.rr-attribution {
	font-family: 'Inter', sans-serif;
	font-size: 0.7rem;
	color: var(--rr-cream);
	opacity: 0.4;
	text-align: center;
	padding: 1.5rem 1rem 0 1rem;
	margin: 0;
	border-top: 1px solid rgba(255,226,199,0.08);
}

/* ---- SMOOTH SCROLL ---- */
html.rr-smooth-scroll.lenis, html.rr-smooth-scroll.lenis body {
	height: auto;
}

.lenis.lenis-smooth {
	scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
	overscroll-behavior: contain;
}

.lenis.lenis-stopped {
	overflow: hidden;
}

/* ---- CUBO 3D HERO con logo ---- */
.rr-cube-3d {
	position: absolute;
	top: 4vh;
	left: 50%;
	transform: translateX(-50%);
	width: 180px;
	height: 180px;
	perspective: 800px;
	z-index: 3;
	pointer-events: none;
}

.rr-cube-3d-inner {
	width: 100%;
	height: 100%;
	position: relative;
	transform-style: preserve-3d;
	animation: rr-cube-rotate 12s infinite linear;
}

.rr-cube-face {
	position: absolute;
	width: 180px;
	height: 180px;
	border: 1px solid rgba(125,8,8,0.35);
	background: rgba(26,15,15,0.25);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: inset 0 0 40px rgba(125,8,8,0.1);
}

.rr-cube-face-front    { transform: translateZ(90px); }
.rr-cube-face-back     { transform: rotateY(180deg) translateZ(90px); }
.rr-cube-face-right    { transform: rotateY(90deg) translateZ(90px); }
.rr-cube-face-left     { transform: rotateY(-90deg) translateZ(90px); }
.rr-cube-face-top      { transform: rotateX(90deg) translateZ(90px); }
.rr-cube-face-bottom   { transform: rotateX(-90deg) translateZ(90px); }

.rr-cube-logo {
	width: 55%;
	height: auto;
	object-fit: contain;
	filter: brightness(1.15) drop-shadow(0 0 8px rgba(125,8,8,0.4));
	image-rendering: auto;
}

@keyframes rr-cube-rotate {
	0%   { transform: rotateX(-20deg) rotateY(0deg); }
	100% { transform: rotateX(-20deg) rotateY(360deg); }
}

@media (max-width: 768px) {
	.rr-cube-3d {
		top: 2vh;
		width: 100px;
		height: 100px;
		perspective: 600px;
	}
	.rr-cube-face {
		width: 100px;
		height: 100px;
	}
	.rr-cube-face-front    { transform: translateZ(50px); }
	.rr-cube-face-back     { transform: rotateY(180deg) translateZ(50px); }
	.rr-cube-face-right    { transform: rotateY(90deg) translateZ(50px); }
	.rr-cube-face-left     { transform: rotateY(-90deg) translateZ(50px); }
	.rr-cube-face-top      { transform: rotateX(90deg) translateZ(50px); }
	.rr-cube-face-bottom   { transform: rotateX(-90deg) translateZ(50px); }
	.rr-cube-logo { width: 50%; }
}

/* ---- CUBO FLOTANTE (esquina sup derecha, link a home) ---- */
.rr-cube-floating {
	position: fixed;
	top: 90px;
	right: 24px;
	width: 65px;
	height: 65px;
	perspective: 400px;
	z-index: 999;
	cursor: pointer;
	pointer-events: auto;
	transition: transform 0.3s ease, filter 0.3s ease;
	filter: drop-shadow(0 0 12px rgba(125,8,8,0.3));
}

.rr-cube-floating:hover {
	transform: scale(1.1);
	filter: drop-shadow(0 0 20px rgba(125,8,8,0.6));
}

.rr-cube-floating .rr-cube-3d-inner {
	animation-duration: 8s;
}

.rr-cube-floating .rr-cube-face {
	width: 65px;
	height: 65px;
	background: rgba(26,15,15,0.35);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border-color: rgba(125,8,8,0.5);
	box-shadow: inset 0 0 20px rgba(125,8,8,0.15);
}

.rr-cube-floating .rr-cube-face-front    { transform: translateZ(32.5px); }
.rr-cube-floating .rr-cube-face-back     { transform: rotateY(180deg) translateZ(32.5px); }
.rr-cube-floating .rr-cube-face-right    { transform: rotateY(90deg) translateZ(32.5px); }
.rr-cube-floating .rr-cube-face-left     { transform: rotateY(-90deg) translateZ(32.5px); }
.rr-cube-floating .rr-cube-face-top      { transform: rotateX(90deg) translateZ(32.5px); }
.rr-cube-floating .rr-cube-face-bottom   { transform: rotateX(-90deg) translateZ(32.5px); }

.rr-cube-floating .rr-cube-logo { width: 50%; }

@media (max-width: 768px) {
	.rr-cube-floating { display: none; }
}

/* ---- LOGO FLOTANTE (esquina sup izquierda, sobre el canvas) ---- */
.rr-logo-floating {
	position: fixed;
	top: 100px;
	left: 24px;
	z-index: 1;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: rgba(26,15,15,0.2);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: 1px solid rgba(125,8,8,0.25);
	box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,226,199,0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rr-logo-floating:hover {
	transform: scale(1.08);
	box-shadow: 0 4px 30px rgba(125,8,8,0.4), inset 0 1px 0 rgba(255,226,199,0.15);
}

.rr-logo-floating-img {
	width: 32px;
	height: auto;
	filter: brightness(1.2) drop-shadow(0 0 6px rgba(125,8,8,0.3));
}

@media (max-width: 768px) {
	.rr-logo-floating { display: none; }
}

/* ---- FLECHA FLOTANTE 3D (indicador de scroll) ---- */
.rr-scroll-arrow {
	position: fixed;
	right: 28px;
	bottom: 40px;
	z-index: 998;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.6s ease;
	perspective: 200px;
}

.rr-scroll-arrow.rr-arrow-visible {
	opacity: 1;
}

.rr-scroll-arrow-glass {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(125,8,8,0.15);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255,226,199,0.15);
	box-shadow: inset 0 1px 0 rgba(255,226,199,0.2), 0 4px 20px rgba(125,8,8,0.3);
	color: rgba(255,226,199,0.85);
	transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
	transform: rotateX(20deg) rotateY(0deg);
	animation: rr-arrow-bob 2.5s ease-in-out infinite;
}

.rr-scroll-arrow-glass svg {
	filter: drop-shadow(0 0 6px rgba(125,8,8,0.4));
}

.rr-scroll-arrow.rr-arrow-up .rr-scroll-arrow-glass {
	transform: rotateX(-20deg) rotateY(180deg);
	animation-name: rr-arrow-bob-up;
}

@keyframes rr-arrow-bob {
	0%, 100% { transform: rotateX(20deg) rotateY(0deg) translateY(0); }
	50%      { transform: rotateX(20deg) rotateY(0deg) translateY(8px); }
}

@keyframes rr-arrow-bob-up {
	0%, 100% { transform: rotateX(-20deg) rotateY(180deg) translateY(0); }
	50%      { transform: rotateX(-20deg) rotateY(180deg) translateY(8px); }
}

@media (max-width: 768px) {
	.rr-scroll-arrow { display: none; }
}

/* ---- ELEMENTOS 3D DECORATIVOS REUTILIZABLES ---- */

/* Rombo 3D flotante (diamante) */
.rr-diamond-3d {
	position: absolute;
	width: 30px;
	height: 30px;
	z-index: 1;
	pointer-events: none;
	transform-style: preserve-3d;
	animation: rr-diamond-spin 8s infinite linear;
	opacity: 0.3;
}

.rr-diamond-3d::before {
	content: '';
	position: absolute;
	inset: 0;
	border: 2px solid rgba(125,8,8,0.5);
	transform: rotate(45deg);
	border-radius: 4px;
	box-shadow: 0 0 20px rgba(125,8,8,0.15), inset 0 0 20px rgba(125,8,8,0.1);
}

.rr-diamond-3d::after {
	content: '';
	position: absolute;
	inset: 4px;
	border: 1px solid rgba(255,226,199,0.2);
	transform: rotate(45deg);
	border-radius: 3px;
}

@keyframes rr-diamond-spin {
	0%   { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
	33%  { transform: rotateX(120deg) rotateY(60deg) rotateZ(120deg); }
	66%  { transform: rotateX(240deg) rotateY(120deg) rotateZ(240deg); }
	100% { transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg); }
}

.rr-diamond-violet::before { border-color: rgba(137,97,96,0.5); box-shadow: 0 0 20px rgba(137,97,96,0.15), inset 0 0 20px rgba(137,97,96,0.1); }

/* Anillo decorativo para secciones */
.rr-ring-deco {
	position: absolute;
	width: 120px;
	height: 120px;
	border: 1px solid rgba(125,8,8,0.12);
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
	animation: rr-ring-float 10s ease-in-out infinite;
}

.rr-ring-deco::before {
	content: '';
	position: absolute;
	inset: -8px;
	border: 1px solid rgba(125,8,8,0.06);
	border-radius: 50%;
	animation: rr-ring-pulse 4s ease-in-out infinite;
}

@keyframes rr-ring-float {
	0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
	50%      { transform: translateY(-20px) scale(1.1); opacity: 0.6; }
}

@keyframes rr-ring-pulse {
	0%, 100% { transform: scale(1); opacity: 0.3; }
	50%      { transform: scale(1.15); opacity: 0.6; }
}

/* Particula glow flotante */
.rr-glow-particle {
	position: absolute;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
	opacity: 0.4;
}

.rr-glow-particle-wine {
	background: rgba(125,8,8,0.4);
	box-shadow: 0 0 15px rgba(125,8,8,0.3);
}

.rr-glow-particle-cream {
	background: rgba(255,226,199,0.25);
	box-shadow: 0 0 15px rgba(255,226,199,0.15);
}

.rr-glow-particle-violet {
	background: rgba(137,97,96,0.3);
	box-shadow: 0 0 15px rgba(137,97,96,0.2);
}

@keyframes rr-float-1 {
	0%, 100% { transform: translate(0, 0); }
	25%      { transform: translate(15px, -20px); }
	50%      { transform: translate(-10px, -35px); }
	75%      { transform: translate(-20px, -15px); }
}

@keyframes rr-float-2 {
	0%, 100% { transform: translate(0, 0); }
	25%      { transform: translate(-18px, -15px); }
	50%      { transform: translate(10px, -30px); }
	75%      { transform: translate(20px, -10px); }
}

@keyframes rr-float-3 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33%      { transform: translate(12px, -25px) scale(1.3); }
	66%      { transform: translate(-15px, -10px) scale(0.8); }
}

@media (max-width: 768px) {
	.rr-cube-3d {
		top: 4vh;
		width: 60px;
		height: 60px;
	}
	.rr-cube-face {
		width: 60px;
		height: 60px;
	}
	.rr-cube-face-front    { transform: translateZ(30px); }
	.rr-cube-face-back     { transform: rotateY(180deg) translateZ(30px); }
	.rr-cube-face-right    { transform: rotateY(90deg) translateZ(30px); }
	.rr-cube-face-left     { transform: rotateY(-90deg) translateZ(30px); }
	.rr-cube-face-top      { transform: rotateX(90deg) translateZ(30px); }
	.rr-cube-face-bottom   { transform: rotateX(-90deg) translateZ(30px); }
	.rr-cube-logo { width: 55%; }
}

/* ---- ACCESIBILIDAD: prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
	#rr-canvas-scene,
	#rr-canvas-portfolio,
	#rr-canvas-contact {
		display: none !important;
	}

	.rr-hero-bg {
		background: linear-gradient(135deg, var(--rr-dark) 0%, var(--rr-primary) 50%, var(--rr-wine) 100%) !important;
	}

	.rr-section,
	.rr-cta-section,
	.rr-glass,
	.rr-glass-dark {
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
		background: rgba(26,15,15,0.9) !important;
	}

	.rr-scroll-hint,
	.rr-loader-spinner,
	.rr-loader-roll-inner,
	.rr-cube-3d-inner {
		animation: none !important;
	}
	.rr-cube-3d,
	.rr-float-tetra,
	.rr-diamond-3d,
	.rr-ring-deco,
	.rr-glow-particle {
		animation: none !important;
	}
	.rr-cube-3d,
	.rr-hero-orbits,
	.rr-float-tetra,
	.rr-diamond-3d,
	.rr-ring-deco,
	.rr-glow-particle { display: none !important; }

	.rr-3d-icon img,
	.rr-3d-team-card {
		transition: none !important;
		transform: none !important;
	}
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
	.rr-hero,
	.rr-hero-content {
		min-height: 80vh;
		padding: 2rem 1.5rem;
	}

	.rr-section {
		margin: 2rem 1rem;
		padding: 2rem 1.5rem;
	}

	.rr-cta-section {
		margin: 3rem 1rem;
		padding: 2rem 1.5rem;
	}

	.rr-hero-ctas {
		flex-direction: column;
		gap: 0.75rem;
	}

	.rr-btn {
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.rr-hero-title {
		font-size: clamp(2rem, 10vw, 3rem);
	}

	.rr-section h2 {
		font-size: clamp(1.5rem, 6vw, 2.25rem);
	}
}

/* ---- FALLBACK: WebGL no soportado ---- */
.no-webgl .rr-hero-bg {
	background: linear-gradient(135deg, var(--rr-dark) 0%, var(--rr-primary) 60%, var(--rr-wine) 100%);
}

.no-webgl .rr-hero-bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% 40%, rgba(125,8,8,0.3) 0%, transparent 60%);
	z-index: 0;
}

/* ---- WPForms ---- */
.wpforms-field-label {
	color: var(--rr-cream) !important;
}

.wpforms-field-sublabel {
	color: var(--rr-cream) !important;
	opacity: 0.7;
}

.wpforms-submit {
	background: var(--rr-wine) !important;
	color: var(--rr-cream) !important;
	border: none !important;
	border-radius: 10px !important;
	padding: 0.9rem 2rem !important;
	font-family: 'Inter', sans-serif !important;
	font-weight: 500 !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.wpforms-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 20px rgba(125,8,8,0.5);
}

.wpforms-container input,
.wpforms-container textarea {
	background: rgba(255,226,199,0.06) !important;
	border: 1px solid rgba(255,226,199,0.15) !important;
	border-radius: 8px !important;
	color: var(--rr-cream) !important;
	font-family: 'Inter', sans-serif !important;
}

.wpforms-container input:focus,
.wpforms-container textarea:focus {
	border-color: var(--rr-wine) !important;
	box-shadow: 0 0 0 2px rgba(125,8,8,0.2) !important;
}

.wpforms-container input::placeholder,
.wpforms-container textarea::placeholder {
	color: rgba(255,226,199,0.4) !important;
}

/* ---- MEJORAS VISUALES PARA MOVIL / TABLET ---- */
@media (pointer: coarse) and (max-width: 1024px), (max-width: 768px) {
	/* Sin 3D canvas ni smooth scroll en touch */
	#rr-canvas-scene { display: none !important; }
	.rr-hero { min-height: 70vh !important; }
	.rr-hero-content {
		padding: 1.5rem 1rem !important;
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
		background: rgba(26,15,15,0.3) !important;
	}
	.rr-section, .rr-cta-section {
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
		background: rgba(26,15,15,0.5) !important;
		margin: 1.5rem 0.75rem !important;
		padding: 1.5rem 1rem !important;
	}
	.rr-glass {
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
		background: rgba(26,15,15,0.6) !important;
	}
	body { font-size: 15px; }
	.rr-section h2, .rr-cta-section h2 {
		font-size: clamp(1.3rem, 5vw, 1.75rem) !important;
	}
	.rr-header-glass {
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
		background: rgba(13,11,20,0.85) !important;
	}
}