@charset "UTF-8";
/* ============================================================================
 * Rincón & Partners: Legal & Capital  |  rinconlegalcapital.com
 * css/main.css  —  Layout + Skin de marca (Oxford Blue · Oro Viejo)
 * ----------------------------------------------------------------------------
 * Mobile-First. Conserva la mecánica del template Dimension (HTML5 UP, CCA 3.0):
 *   - body.is-preload           → estado de carga (fade-in)
 *   - body.is-article-visible   → blur del fondo cuando hay modal abierto
 *   - #main article             → modal cerrado (opacity 0, translateY 0.25rem)
 *   - #main article.active      → modal abierto (opacity 1, translateY 0)
 *   - #main article .close      → botón X inyectado dinámicamente por main.js
 *
 * Componentes nuevos (specialty-grid, capital-services, pillars,
 * lang-switcher, wa-float, chibot, lead form premium) viven en custom.css.
 * ========================================================================== */


/* ============================================================================
 * 1. TOKENS DE MARCA  (CSS Custom Properties — un único punto de control)
 * ========================================================================== */
:root {
	/* —— Paleta institucional —— */
	--oxford-blue:        #0A2342;   /* color institucional primario */
	--oxford-blue-deep:   #061633;   /* sombras y profundidad */
	--oxford-blue-soft:   #14315B;   /* hover y degradados */
	--gold:               #B8893C;   /* acento Oro Viejo */
	--gold-soft:          #D4AF6A;   /* hover dorado */
	--gold-glow:          rgba(184, 137, 60, 0.18);
	--ivory:              #F5F1E8;   /* marfil cálido (fondos texto) */
	--ivory-soft:         #FAF8F2;   /* marfil ultra suave */
	--charcoal:           #2C2C2C;   /* texto principal */
	--steel:              #4A5568;   /* texto secundario */
	--steel-light:        #718096;   /* metadata, divisores */
	--white:              #FFFFFF;
	--black:              #000000;

	/* —— Estados —— */
	--success:            #2F855A;
	--warning:            #C05621;
	--danger:             #9B2C2C;

	/* —— Tipografía —— */
	--font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

	/* —— Escala tipográfica fluida (mobile-first) —— */
	--fs-xs:   0.75rem;
	--fs-sm:   0.875rem;
	--fs-base: 1rem;
	--fs-md:   1.125rem;
	--fs-lg:   1.375rem;
	--fs-xl:   1.75rem;
	--fs-2xl:  2.25rem;
	--fs-3xl:  3rem;
	--fs-hero: clamp(2.5rem, 6vw, 4.5rem);

	/* —— Espaciado base (sistema 8px) —— */
	--sp-1: 0.25rem;
	--sp-2: 0.5rem;
	--sp-3: 0.75rem;
	--sp-4: 1rem;
	--sp-5: 1.5rem;
	--sp-6: 2rem;
	--sp-7: 3rem;
	--sp-8: 4rem;

	/* —— Radios —— */
	--radius-sm: 2px;
	--radius:    4px;
	--radius-lg: 8px;
	--radius-xl: 16px;
	--radius-pill: 999px;

	/* —— Sombras (sutiles, institucionales) —— */
	--shadow-sm: 0 1px 2px rgba(6, 22, 51, 0.06);
	--shadow:    0 4px 12px rgba(6, 22, 51, 0.10);
	--shadow-lg: 0 12px 32px rgba(6, 22, 51, 0.18);
	--shadow-gold: 0 4px 18px rgba(184, 137, 60, 0.25);

	/* —— Transiciones —— */
	--ease:     cubic-bezier(0.4, 0, 0.2, 1);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--dur-fast:  180ms;
	--dur-base:  325ms;
	--dur-slow:  600ms;

	/* —— Layout —— */
	--container-narrow: 36rem;
	--container:        44rem;   /* ancho del modal-article */
	--container-wide:   64rem;

	/* —— Z-index escala —— */
	--z-bg:        1;
	--z-wrapper:   3;
	--z-floating:  100;   /* WhatsApp, lang switcher */
	--z-chibot:    200;   /* Chibot por encima */
	--z-modal:     1000;
}


/* ============================================================================
 * 2. RESET MODERNO  (concise + accesible)
 * ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
	scroll-behavior: smooth;
	font-size: 16px;
}

body, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
dl, dd, ol, ul, figure, hr, fieldset, legend {
	margin: 0;
	padding: 0;
}

ul[role="list"], ol[role="list"], ul, ol { list-style: none; }

body {
	min-height: 100vh;
	min-height: 100dvh;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img, picture, svg, video {
	display: block;
	max-width: 100%;
	height: auto;
}

input, button, textarea, select {
	font: inherit;
	color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--dur-fast) var(--ease);
}

table { border-collapse: collapse; border-spacing: 0; }

/* Foco accesible global (clave para audiencia bancaria/regulada) */
:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Selección de texto con la marca */
::selection {
	background-color: var(--gold);
	color: var(--oxford-blue-deep);
}

/* Scrollbar discreto en navegadores Webkit */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--oxford-blue-deep); }
::-webkit-scrollbar-thumb {
	background: var(--steel);
	border-radius: var(--radius-pill);
	border: 2px solid var(--oxford-blue-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }


/* ============================================================================
 * 3. BASE  (body + tipografía global)
 * ========================================================================== */
body {
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	font-weight: 400;
	color: var(--ivory);
	background-color: var(--oxford-blue-deep);
	overflow-x: hidden;
}

/* Fade-in inicial (preserva mecánica Dimension) */
body.is-preload *, body.is-preload *::before, body.is-preload *::after {
	-webkit-animation: none !important;
	animation: none !important;
	-webkit-transition: none !important;
	transition: none !important;
}

/* Bloquea scroll del body cuando hay modal abierto */
body.is-article-visible {
	overflow: hidden;
}


/* ============================================================================
 * 4. TIPOGRAFÍA  (Playfair → autoridad · Inter → legibilidad)
 * ========================================================================== */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-serif);
	font-weight: 700;
	line-height: 1.2;
	color: var(--ivory-soft);
	letter-spacing: -0.01em;
}

h1 {
	font-size: var(--fs-hero);
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

h2 {
	font-size: var(--fs-2xl);
	margin-bottom: var(--sp-5);
}

h3 {
	font-size: var(--fs-xl);
	margin-bottom: var(--sp-4);
}

h4 {
	font-size: var(--fs-lg);
	margin-bottom: var(--sp-3);
}

h5 { font-size: var(--fs-md); margin-bottom: var(--sp-3); }
h6 { font-size: var(--fs-base); margin-bottom: var(--sp-2); text-transform: uppercase; letter-spacing: 0.08em; }

p {
	margin-bottom: var(--sp-4);
	color: var(--ivory);
	max-width: 65ch; /* línea óptima de lectura */
}

p.lead {
	font-size: var(--fs-md);
	line-height: 1.55;
	color: var(--ivory-soft);
	margin-bottom: var(--sp-5);
}

strong, b { font-weight: 600; color: var(--white); }
em, i { font-style: italic; }

a {
	color: var(--gold-soft);
	border-bottom: 1px solid transparent;
}
a:hover {
	color: var(--gold);
	border-bottom-color: var(--gold);
}

/* Header/Section title con filete dorado inferior */
h2.major {
	display: inline-block;
	position: relative;
	padding-bottom: var(--sp-3);
	margin-bottom: var(--sp-6);
}
h2.major::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 3rem;
	height: 2px;
	background: var(--gold);
}

/* Blockquote elegante */
blockquote {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: var(--fs-md);
	line-height: 1.55;
	color: var(--ivory-soft);
	padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-6);
	margin: var(--sp-6) 0;
	border-left: 3px solid var(--gold);
	background: rgba(184, 137, 60, 0.04);
	border-radius: 0 var(--radius) var(--radius) 0;
}

hr {
	border: 0;
	height: 1px;
	background: linear-gradient(to right, transparent, var(--steel), transparent);
	margin: var(--sp-6) 0;
}

/* Sub-headline del hero */
.subhead {
	display: block;
	font-size: 0.45em;
	font-weight: 400;
	font-style: italic;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--gold-soft);
	margin-top: var(--sp-3);
}

.tagline {
	font-size: var(--fs-md);
	max-width: 38rem;
	margin: var(--sp-4) auto 0;
	color: var(--ivory);
}
.tagline em {
	font-family: var(--font-serif);
	color: var(--gold-soft);
}

/* Utilidad: solo lectores de pantalla */
.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}


/* ============================================================================
 * 5. FORM  (white-glove: campos sobrios, focus dorado, validación clara)
 * ========================================================================== */
form .fields {
	display: -ms-flexbox;
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-4);
	margin-bottom: var(--sp-5);
}

form .field {
	flex: 1 1 100%;
}

/* Mobile-first: campos a 100%, el .half se aplica desde tablet. */
@media (min-width: 737px) {
	form .field.half { flex: 1 1 calc(50% - var(--sp-4) / 2); }
	form .field.third { flex: 1 1 calc(33.333% - var(--sp-4) * 2 / 3); }
}

label {
	display: block;
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	font-weight: 500;
	color: var(--ivory-soft);
	margin-bottom: var(--sp-2);
	letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="url"],
input[type="search"],
select,
textarea {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	padding: 0.75rem 1rem;
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	color: var(--ivory-soft);
	background-color: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(245, 241, 232, 0.18);
	border-radius: var(--radius);
	transition: border-color var(--dur-fast) var(--ease),
	            background-color var(--dur-fast) var(--ease),
	            box-shadow var(--dur-fast) var(--ease);
}

input::placeholder, textarea::placeholder {
	color: var(--steel-light);
	opacity: 1;
}

input:hover, select:hover, textarea:hover {
	background-color: rgba(255, 255, 255, 0.06);
	border-color: rgba(245, 241, 232, 0.28);
}

input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--gold);
	background-color: rgba(184, 137, 60, 0.06);
	box-shadow: 0 0 0 3px var(--gold-glow);
}

textarea {
	min-height: 8rem;
	resize: vertical;
	line-height: 1.5;
}

/* Select con caret custom */
select {
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23D4AF6A' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 12px 8px;
	padding-right: 2.5rem;
	cursor: pointer;
}
select option { background: var(--oxford-blue-deep); color: var(--ivory); }

/* Checkbox & Radio elegantes */
input[type="checkbox"], input[type="radio"] {
	-webkit-appearance: none;
	appearance: none;
	width: 1.125rem;
	height: 1.125rem;
	margin-right: var(--sp-2);
	vertical-align: middle;
	border: 1px solid rgba(245, 241, 232, 0.35);
	background-color: rgba(255, 255, 255, 0.04);
	cursor: pointer;
	transition: all var(--dur-fast) var(--ease);
	display: inline-block;
	position: relative;
}
input[type="checkbox"] { border-radius: var(--radius-sm); }
input[type="radio"] { border-radius: 50%; }

input[type="checkbox"]:checked,
input[type="radio"]:checked {
	background-color: var(--gold);
	border-color: var(--gold);
}

input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	left: 5px; top: 1px;
	width: 5px; height: 10px;
	border: solid var(--oxford-blue-deep);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	left: 4px; top: 4px;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--oxford-blue-deep);
}

input[type="checkbox"] + label,
input[type="radio"] + label {
	display: inline;
	cursor: pointer;
	color: var(--ivory);
	font-weight: 400;
	font-size: var(--fs-sm);
}

/* Estado de campo inválido (lo activa rincon-ux.js) */
input.invalid, select.invalid, textarea.invalid {
	border-color: var(--danger);
	box-shadow: 0 0 0 3px rgba(155, 44, 44, 0.18);
}


/* ============================================================================
 * 6. BUTTON  (jerarquía: primary dorado · default outline · disabled apagado)
 * ========================================================================== */
.button,
input[type="submit"],
input[type="reset"],
button.button {
	-webkit-appearance: none;
	appearance: none;
	display: inline-block;
	min-width: 10rem;
	padding: 0.875rem 2rem;
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	color: var(--ivory-soft);
	background-color: transparent;
	border: 1px solid rgba(245, 241, 232, 0.35);
	border-radius: var(--radius);
	cursor: pointer;
	transition: all var(--dur-fast) var(--ease);
	text-decoration: none;
}

.button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
	background-color: rgba(255, 255, 255, 0.06);
	border-color: var(--ivory);
	color: var(--white);
}

/* Variante primaria — Oro Viejo, llamado a la acción institucional */
.button.primary,
input[type="submit"].primary,
button.button.primary {
	background-color: var(--gold);
	border-color: var(--gold);
	color: var(--oxford-blue-deep);
	box-shadow: var(--shadow-gold);
}
.button.primary:hover,
input[type="submit"].primary:hover {
	background-color: var(--gold-soft);
	border-color: var(--gold-soft);
	color: var(--oxford-blue-deep);
	transform: translateY(-1px);
	box-shadow: 0 6px 22px rgba(184, 137, 60, 0.40);
}

/* Tamaños */
.button.small { padding: 0.5rem 1.25rem; font-size: var(--fs-xs); }
.button.large { padding: 1.125rem 2.5rem; font-size: var(--fs-base); }

/* Disabled */
.button.disabled,
.button:disabled,
input[type="submit"]:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

/* Botón con icono inline (compatibilidad con clases del template) */
.button.icon::before {
	margin-right: 0.6em;
	opacity: 0.85;
}


/* ============================================================================
 * 7. ACTIONS  (lista horizontal de botones — preserva API del template)
 * ========================================================================== */
ul.actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-3);
	margin-bottom: var(--sp-5);
	padding: 0;
	list-style: none;
}
ul.actions.stacked { flex-direction: column; align-items: stretch; }
ul.actions.fit { width: 100%; }
ul.actions.fit > li { flex: 1; }
ul.actions.fit > li > .button,
ul.actions.fit > li > input[type="submit"] { width: 100%; }


/* ============================================================================
 * 8. BOX  (contenedor utilitario del template)
 * ========================================================================== */
.box {
	border: 1px solid rgba(245, 241, 232, 0.18);
	border-radius: var(--radius-lg);
	margin-bottom: var(--sp-5);
	padding: var(--sp-5);
	background: rgba(10, 35, 66, 0.4);
}
.box.alt {
	border: 0;
	padding: 0;
	background: transparent;
	border-radius: 0;
}


/* ============================================================================
 * 9. ICON  (compatibilidad Font Awesome del template)
 * ========================================================================== */
.icon {
	text-decoration: none;
	border-bottom: none;
	position: relative;
}
.icon::before {
	font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome';
	font-style: normal;
	font-variant: normal;
	text-transform: none;
	speak: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.icon > .label { display: none; }

/* Icono dentro del logo del header */
.icon.fa-gem::before { color: var(--gold); }


/* ============================================================================
 * 10. ICONS  (lista horizontal de iconos sociales, p.ej. footer)
 * ========================================================================== */
ul.icons {
	display: flex;
	gap: var(--sp-3);
	padding: 0;
	margin: var(--sp-5) 0 0;
	list-style: none;
}
ul.icons li a {
	display: -ms-inline-flexbox;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid rgba(245, 241, 232, 0.25);
	border-radius: 50%;
	color: var(--ivory-soft);
	font-size: 1rem;
	transition: all var(--dur-fast) var(--ease);
}
ul.icons li a:hover {
	background-color: var(--gold);
	border-color: var(--gold);
	color: var(--oxford-blue-deep);
	transform: translateY(-2px);
}


/* ============================================================================
 * 11. IMAGE  (imagen "main" del modal-article — patrón Dimension)
 * ========================================================================== */
.image {
	display: inline-block;
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: var(--sp-5);
}
.image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: inherit;
}
.image.main {
	display: block;
	margin: 0 0 var(--sp-6) 0;
	max-height: 22rem;
	object-fit: cover;
}
.image.main img {
	max-height: 22rem;
	object-fit: cover;
}
.image.fit { display: block; }
.image.left  { float: left; margin: 0 var(--sp-5) var(--sp-4) 0; max-width: 40%; }
.image.right { float: right; margin: 0 0 var(--sp-4) var(--sp-5); max-width: 40%; }


/* ============================================================================
 * 12. LIST  (listas básicas dentro de los modales)
 * ========================================================================== */
#main article ul,
#main article ol {
	padding-left: 1.25rem;
	margin-bottom: var(--sp-5);
}
#main article ul li,
#main article ol li {
	margin-bottom: var(--sp-2);
	color: var(--ivory);
	line-height: 1.55;
}
#main article ul { list-style: none; }
#main article ul li { position: relative; padding-left: 1.25rem; }
#main article ul li::before {
	content: '';
	position: absolute;
	left: 0; top: 0.65em;
	width: 0.4rem; height: 0.4rem;
	background: var(--gold);
	border-radius: 50%;
}
#main article ol { list-style: decimal; padding-left: 1.5rem; }


/* ============================================================================
 * 13. TABLE  (tablas elegantes, alineación numérica tabular)
 * ========================================================================== */
.table-wrapper { overflow-x: auto; margin-bottom: var(--sp-5); }
table {
	width: 100%;
	font-variant-numeric: tabular-nums; /* alineación de cifras */
}
table thead th {
	padding: var(--sp-3) var(--sp-4);
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--gold-soft);
	border-bottom: 2px solid var(--gold);
	text-align: left;
}
table tbody td {
	padding: var(--sp-3) var(--sp-4);
	border-bottom: 1px solid rgba(245, 241, 232, 0.10);
	color: var(--ivory);
}
table tbody tr:hover { background-color: rgba(184, 137, 60, 0.04); }
table tfoot td {
	padding: var(--sp-3) var(--sp-4);
	font-weight: 600;
	color: var(--ivory-soft);
	border-top: 2px solid var(--gold);
}


/* ============================================================================
 * 14. BG  ⚠️  Mecánica Dimension PRESERVADA + skin Oxford Blue
 *
 * Cambios respecto al original:
 *  - Reemplazo del overlay rgba(19,21,25,0.5) → degradado Oxford profundo.
 *  - Reemplazo de bg.jpg → gradiente CSS multicapa (sin imagen requerida).
 *    Si en el futuro se desea fondo fotográfico, basta con descomentar la
 *    línea `background-image: url(...)` en #bg::after.
 * ========================================================================== */
#bg {
	position: fixed;
	top: 0; left: 0;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	z-index: var(--z-bg);
	transform: scale(1);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

#bg::before, #bg::after {
	content: '';
	display: block;
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	height: 100%;
}

/* Capa 1: overlay institucional con vignette + brillo dorado sutil */
#bg::before {
	background:
		radial-gradient(ellipse at top right, var(--gold-glow) 0%, transparent 45%),
		radial-gradient(ellipse at bottom left, rgba(20, 49, 91, 0.45) 0%, transparent 55%),
		linear-gradient(180deg, rgba(6, 22, 51, 0.55), rgba(6, 22, 51, 0.85));
	transition: background-color 2.5s ease-in-out;
	transition-delay: 0.75s;
	z-index: 2;
}

/* Capa 2: fondo principal Oxford con foto institucional + tinte de marca */
#bg::after {
	background:
		/* Capa de tinte Oxford encima de la foto para preservar identidad */
		linear-gradient(135deg,
			rgba(6, 22, 51, 0.78) 0%,
			rgba(10, 35, 66, 0.65) 50%,
			rgba(14, 45, 82, 0.78) 100%),
		/* Foto institucional de fondo */
		url("../images/bg.jpg");
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	background-attachment: fixed;  /* parallax sutil en desktop */
	transform: scale(1.125);
	transition: transform var(--dur-base) var(--ease),
	            filter var(--dur-base) var(--ease);
	z-index: 1;
}

/* Mobile: desactivar background-attachment fixed (problemático en iOS Safari) */
@media (max-width: 736px) {
	#bg::after { background-attachment: scroll; }
}

/* Cuando hay un modal abierto: blur sutil del fondo (mecánica Dimension) */
body.is-article-visible #bg::after {
	transform: scale(1.0825);
	filter: blur(0.2rem);
}

/* Estado de carga inicial: pantalla negra que hace fade */
body.is-preload #bg::before { background-color: var(--black); }


/* ============================================================================
 * 15. WRAPPER  (contenedor flex vertical, full-viewport)
 * ========================================================================== */
#wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
	width: 100%;
	padding: var(--sp-4);
	z-index: var(--z-wrapper);
}

#wrapper::before {
	content: '';
	display: block;
}

@media (min-width: 481px) {
	#wrapper { padding: var(--sp-6) var(--sp-5); }
}
@media (min-width: 737px) {
	#wrapper { padding: var(--sp-7) var(--sp-6); }
}
@media (min-width: 1281px) {
	#wrapper { padding: var(--sp-8) var(--sp-6); }
}

/* Ultra-wide (1681px+): centrar contenido y limitar ancho útil
   para preservar legibilidad y jerarquía visual en monitores 27"+ */
@media (min-width: 1681px) {
	#wrapper {
		max-width: 1280px;
		margin-left: auto;
		margin-right: auto;
	}
	#header,
	#footer,
	#main {
		margin-left: auto;
		margin-right: auto;
	}
}

/* 4K / 5K / monitores ultra-anchos (2400px+): un poco más de respiro */
@media (min-width: 2400px) {
	#wrapper {
		max-width: 1440px;
		padding-top: var(--sp-8);
		padding-bottom: var(--sp-8);
	}
}


/* ============================================================================
 * 16. HEADER / HERO  (logo + h1 + nav — primera impresión institucional)
 * ========================================================================== */
#header {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	max-width: 100%;
	padding: var(--sp-6) var(--sp-4);
	transition: opacity var(--dur-slow) var(--ease),
	            transform var(--dur-slow) var(--ease);
}

/* Cuando se abre un modal, el header se desvanece y se desplaza hacia arriba */
body.is-article-visible #header {
	opacity: 0;
	transform: translateY(-1rem);
	pointer-events: none;
}

/* —— Logo monograma (RC con filete dorado) —— */
#header .logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 5.5rem;
	height: 5.5rem;
	margin-bottom: var(--sp-5);
	border: 2px solid var(--gold);
	border-radius: 50%;
	background: rgba(184, 137, 60, 0.06);
	font-family: var(--font-serif);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--gold);
	transition: all var(--dur-base) var(--ease-out);
}
#header .logo:hover {
	background: var(--gold);
	color: var(--oxford-blue-deep);
	box-shadow: var(--shadow-gold);
}
#header .logo .logo-mark {
	display: inline-flex;
	align-items: baseline;
	letter-spacing: -0.04em;
}
#header .logo .logo-amp {
	font-style: italic;
	font-size: 0.7em;
	color: var(--gold-soft);
	margin: 0 0.05em;
}

/* —— Contenido del hero —— */
#header .content {
	max-width: 56rem;
	border-top: 1px solid rgba(245, 241, 232, 0.18);
	border-bottom: 1px solid rgba(245, 241, 232, 0.18);
	padding: var(--sp-5) var(--sp-4);
	margin-bottom: var(--sp-6);
}
#header .content .inner > h1 {
	margin-bottom: var(--sp-4);
}

/* —— Navegación principal —— */
#header nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--sp-2);
	padding: 0;
	margin: 0;
	list-style: none;
}
#header nav li {
	display: block;
}
#header nav a {
	display: block;
	padding: 0.65rem 1.15rem;
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ivory-soft);
	border: 1px solid transparent;
	border-radius: var(--radius);
	transition: all var(--dur-fast) var(--ease);
}
#header nav a:hover {
	color: var(--gold);
	border-color: rgba(184, 137, 60, 0.4);
	background: rgba(184, 137, 60, 0.06);
}
#header nav a:active {
	color: var(--white);
	background: var(--gold);
	border-color: var(--gold);
}

/* Breakpoint medium: header más respirado */
@media (min-width: 737px) {
	#header { padding: var(--sp-7) var(--sp-6); }
	#header .logo { width: 6.5rem; height: 6.5rem; font-size: 2rem; }
	#header .content { padding: var(--sp-6) var(--sp-5); }
}
@media (min-width: 981px) {
	#header { padding: var(--sp-8) var(--sp-6); }
}


/* ============================================================================
 * 17. MAIN + ARTICLE  ⚠️  Mecánica modal Dimension PRESERVADA
 *
 *  - article            → opacity 0, translateY(0.25rem), display:none
 *  - article.active     → opacity 1, translateY(0), display:block
 *  - article .close     → botón X (inyectado por main.js del template)
 * ========================================================================== */
#main {
	flex-grow: 1;
	flex-shrink: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	position: relative;
	max-width: 100%;
	width: 100%;
	z-index: var(--z-wrapper);
}

#main article {
	position: relative;
	width: var(--container);
	max-width: 100%;
	padding: 4.5rem 2.5rem 1.5rem;
	background-color: rgba(6, 22, 51, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(184, 137, 60, 0.18);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	transform: translateY(0.25rem);
	opacity: 0;
	transition: opacity var(--dur-base) var(--ease),
	            transform var(--dur-base) var(--ease);
}

/* Estado activo del modal */
#main article.active {
	transform: translateY(0);
	opacity: 1;
}

/* —— Botón X de cierre (inyectado dinámicamente por js/main.js) —— */
#main article .close {
	display: block;
	position: absolute;
	top: 0; right: 0;
	width: 4rem;
	height: 4rem;
	cursor: pointer;
	text-indent: 4rem;
	overflow: hidden;
	white-space: nowrap;
	z-index: 1;
}
#main article .close::before {
	content: '';
	display: block;
	position: absolute;
	top: 0.75rem; left: 0.75rem;
	width: 2.5rem; height: 2.5rem;
	border-radius: 50%;
	background-position: center;
	background-repeat: no-repeat;
	background-size: 18px 18px;
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23F5F1E8' stroke-width='1.5' d='M3 3l14 14M17 3L3 17'/%3E%3C/svg%3E");
	transition: background-color var(--dur-fast) var(--ease),
	            transform var(--dur-fast) var(--ease);
}
#main article .close:hover::before {
	background-color: rgba(184, 137, 60, 0.18);
	transform: rotate(90deg);
}
#main article .close:active::before {
	background-color: rgba(184, 137, 60, 0.30);
}

/* Responsive del modal */
@media (max-width: 736px) {
	#main article {
		padding: 3.5rem var(--sp-5) var(--sp-3);
		border-radius: var(--radius);
	}
	#main article .close::before {
		top: 0.875rem; left: 0.875rem;
		width: 2.25rem; height: 2.25rem;
		background-size: 14px 14px;
	}
}
@media (max-width: 480px) {
	#main article {
		padding: 3rem var(--sp-4) var(--sp-2);
	}
}


/* ============================================================================
 * 18. FOOTER  (pie institucional sobrio)
 * ========================================================================== */
#footer {
	/* Centrado de bloque garantizado en cualquier resolución */
	display: block;
	width: 100%;
	max-width: var(--container-wide);
	margin: 0 auto !important;        /* override defensivo anti ultra-wide */
	padding: var(--sp-5) var(--sp-4) 0;
	text-align: center;
	transition: opacity var(--dur-slow) var(--ease),
	            transform var(--dur-slow) var(--ease);
}

body.is-article-visible #footer {
	opacity: 0;
	transform: translateY(1rem);
	pointer-events: none;
}

#footer .copyright {
	display: block;
	width: 100%;
	margin: 0 auto var(--sp-2);
	font-size: var(--fs-xs);
	color: var(--steel-light);
	letter-spacing: 0.05em;
	line-height: 1.6;
	text-align: center;       /* refuerzo */
}
#footer .copyright a {
	color: var(--ivory-soft);
	border-bottom: 1px dotted rgba(245, 241, 232, 0.3);
	margin: 0 var(--sp-2);
}
#footer .copyright a:hover {
	color: var(--gold);
	border-bottom-color: var(--gold);
}
#footer .attribution {
	display: block;
	width: 100%;
	margin: var(--sp-3) auto 0;
	font-size: 0.7rem;
	color: var(--steel);
	letter-spacing: 0.04em;
	text-align: center;
	line-height: 1.5;
}
#footer .attribution a { color: var(--steel-light); }
#footer .attribution a:hover {
	color: var(--gold-soft);
	border-bottom-color: var(--gold-soft);
}


/* ============================================================================
 * 19. ANIMACIONES  (entrada del header al cargar)
 * ========================================================================== */
@keyframes rincon-fade-up {
	from { opacity: 0; transform: translateY(1rem); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes rincon-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Aplicación selectiva (no tocamos los modales, los maneja main.js) */
body:not(.is-preload) #header .logo    { animation: rincon-fade-up var(--dur-slow) var(--ease-out) 0.1s both; }
body:not(.is-preload) #header .content { animation: rincon-fade-up var(--dur-slow) var(--ease-out) 0.3s both; }
body:not(.is-preload) #header nav      { animation: rincon-fade-up var(--dur-slow) var(--ease-out) 0.5s both; }


/* ============================================================================
 * 20. ACCESIBILIDAD  (reduced motion + high contrast)
 * ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	#bg::after { transform: scale(1) !important; filter: none !important; }
	#main article { transform: none !important; }
}

@media (prefers-contrast: more) {
	body { color: var(--white); }
	#main article {
		background-color: var(--oxford-blue-deep);
		border-color: var(--gold);
	}
	a { color: var(--gold-soft); text-decoration: underline; }
}


/* ============================================================================
 * 21. PRINT  (estilos institucionales para impresión de páginas legales)
 * ========================================================================== */
@media print {
	body { background: white !important; color: black !important; font-size: 11pt; }
	#bg, #header nav, #lang-switcher, #whatsapp-float, #chibot-container,
	#main article .close, #footer .attribution { display: none !important; }
	#wrapper { padding: 0 !important; min-height: auto !important; }
	#main article {
		opacity: 1 !important;
		transform: none !important;
		background: white !important;
		color: black !important;
		border: none !important;
		box-shadow: none !important;
		page-break-inside: avoid;
	}
	h1, h2, h3, h4, h5, h6, p { color: black !important; }
	a { color: black !important; text-decoration: underline; }
	a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}


/* ============================================================================
 * 22. UTILIDADES de scroll-reveal (las activa rincon-ux.js en Fase 3)
 * ========================================================================== */
.reveal { /* hook semántico — el JS añade .is-visible para activar */ }
.reveal.is-visible { animation: rincon-fade-up 0.7s var(--ease-out) both; }


/* ============================================================================
 *  FIN — main.css   ·   © 2026 Rincón & Partners: Legal & Capital
 *  Próximo paso (Fase 2.b): css/custom.css — componentes bespoke nuevos.
 * ========================================================================== */
