/* ============================================================
   FIMEN GROUP — Sistema visual dark-premium
   Basado en la identidad corporativa oficial (_brand/LogoFIMEN.png)
   Compartido por la home (/) y FIMEN Digital (/digital/)
   Paleta y componentes documentados en BRAND.md
   ============================================================ */

:root {
	--navy: #061A35;
	--navy-2: #0A2448;
	--electric: #1D5DFF;
	--cyan: #06B6D4;
	--cyan-light: #54E6FF;
	--white: #FFFFFF;
	--ice: #F4F9FF;
	--ink: #10213F;
	--muted: #61708C;
	--green: #22C55E;
	--text: #E8F1FF;
	--text-dim: rgba(232, 241, 255, .64);
	--text-faint: rgba(232, 241, 255, .42);
	--line: rgba(232, 241, 255, .1);
	--glass: rgba(255, 255, 255, .04);
	--grad: linear-gradient(96deg, var(--electric), var(--cyan-light));
	--font-display: "Space Grotesk", "Segoe UI", sans-serif;
	--font-body: "Inter", "Segoe UI", sans-serif;
	--ease: cubic-bezier(.16, 1, .3, 1);
	--radius: 18px;
	--radius-sm: 11px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
	margin: 0;
	color: var(--text);
	background: var(--navy);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { color: var(--navy); background: var(--cyan-light); }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.03em; line-height: 1.04; margin: 0; }
p { margin: 0; }

.wrap { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }

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

.skip-link {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 300;
	padding: 12px 18px;
	color: var(--navy);
	background: var(--cyan-light);
	border-radius: 0 0 10px 10px;
	font-weight: 700;
	transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* Texto degradado de marca */
.grad-text {
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ------------------------------------------------------------
   Orbes de luz y retícula de fondo
   ------------------------------------------------------------ */
.orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(90px);
	pointer-events: none;
	opacity: .55;
}
.orb-blue { background: rgba(29, 93, 255, .38); }
.orb-cyan { background: rgba(6, 182, 212, .3); }

.grid-bg { position: relative; }
.grid-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(232, 241, 255, .05) 1px, transparent 1px),
		linear-gradient(rgba(232, 241, 255, .05) 1px, transparent 1px);
	background-size: 58px 58px;
	mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 75%);
}
.grid-bg > .wrap { position: relative; }

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	border-bottom: 1px solid transparent;
	transition: background .3s ease, border-color .3s ease;
}
.header.scrolled {
	background: rgba(6, 26, 53, .8);
	border-bottom-color: var(--line);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}
.nav { height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }

/* Marca: monograma FM + wordmark FIMEN (FI blanco / MEN degradado) + GROUP */
.brand { position: relative; z-index: 102; display: inline-flex; align-items: center; gap: 13px; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b {
	font-family: var(--font-display);
	font-size: 1.32rem;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--white);
}
.brand-name b em {
	font-style: normal;
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.brand-name small {
	margin-top: 4px;
	font-family: var(--font-display);
	font-size: .56rem;
	font-weight: 600;
	letter-spacing: .58em;
	text-transform: uppercase;
	color: var(--text-dim);
}

.nav-links { display: flex; align-items: center; gap: 30px; font-size: .9rem; font-weight: 600; }
.nav-links a { position: relative; color: var(--text-dim); transition: color .2s ease; }
.nav-links a:hover { color: var(--white); }
.nav-links a:not(.btn)::after {
	content: "";
	position: absolute;
	left: 0; right: 100%;
	bottom: -6px;
	height: 2px;
	background: var(--grad);
	transition: right .3s var(--ease);
}
.nav-links a:not(.btn):hover::after { right: 0; }
.nav-links .btn { color: var(--white); }

.menu-btn {
	display: none;
	position: relative;
	z-index: 102;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--glass);
	cursor: pointer;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
	content: "";
	position: absolute;
	left: 50%;
	width: 20px;
	height: 2px;
	background: var(--text);
	transform: translateX(-50%);
	transition: transform .3s var(--ease), background .2s ease;
}
.menu-btn span { top: 50%; margin-top: -1px; }
.menu-btn span::before { transform: translate(-50%, -7px); }
.menu-btn span::after { transform: translate(-50%, 7px); }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translate(-50%, 0) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translate(-50%, 0) rotate(-45deg); }

/* ------------------------------------------------------------
   Botones
   ------------------------------------------------------------ */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 56px;
	padding: 0 28px;
	border: 1px solid transparent;
	border-radius: 13px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: .97rem;
	cursor: pointer;
	transition: transform .3s var(--ease), box-shadow .3s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
	color: var(--white);
	background: linear-gradient(96deg, var(--electric), var(--cyan));
	box-shadow: 0 12px 34px rgba(29, 93, 255, .38);
}
.btn-primary:hover { box-shadow: 0 16px 44px rgba(29, 93, 255, .55); }
.btn-ghost { color: var(--text); border-color: rgba(232, 241, 255, .22); background: var(--glass); }
.btn-ghost:hover { border-color: var(--cyan-light); color: var(--cyan-light); }
.btn-light { color: var(--navy); background: var(--white); }
.btn-light:hover { background: var(--cyan-light); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ------------------------------------------------------------
   Texto, etiquetas y chips
   ------------------------------------------------------------ */
.kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 22px;
	font-family: var(--font-display);
	font-size: .74rem;
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--cyan-light);
}
.kicker::before { content: ""; width: 9px; height: 9px; border: 2px solid currentColor; border-radius: 50%; }
.kicker::after { content: ""; width: 38px; height: 1px; background: currentColor; opacity: .5; }

.display-xl { font-size: clamp(3rem, 6.6vw, 5.9rem); font-weight: 700; letter-spacing: -.04em; }
.display-lg { font-size: clamp(2.2rem, 4.4vw, 3.8rem); font-weight: 700; letter-spacing: -.035em; }
.display-md { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 600; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.7; color: var(--text-dim); }

.chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--glass);
	font-family: var(--font-display);
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.chip.live { color: var(--green); border-color: rgba(34, 197, 94, .4); }
.chip.live .dot { background: var(--green); box-shadow: 0 0 10px rgba(34, 197, 94, .8); }
.chip.soon { color: var(--text-faint); }

.coord {
	font-family: var(--font-display);
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--cyan);
}

/* Tagline de marca: EXPERIENCIA · TECNOLOGÍA · PERSONAS · RESULTADOS */
.tagline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 0;
	font-family: var(--font-display);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .26em;
	text-transform: uppercase;
	color: var(--text-dim);
}
.tagline span { display: inline-flex; align-items: center; }
.tagline span + span::before {
	content: "";
	width: 6px;
	height: 6px;
	margin: 0 16px;
	border-radius: 50%;
	background: var(--cyan);
}

/* ------------------------------------------------------------
   Secciones
   ------------------------------------------------------------ */
.section { position: relative; padding: clamp(90px, 11vw, 150px) 0; }
.section-alt { background: var(--navy-2); border-block: 1px solid var(--line); }
.section-head { position: relative; max-width: 780px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head .lead { margin-top: 20px; }

/* ------------------------------------------------------------
   Tarjetas de cristal
   ------------------------------------------------------------ */
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 13px;
	padding: 32px 30px;
	background: var(--glass);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	backdrop-filter: blur(8px);
	transition: transform .35s var(--ease), border-color .3s ease, box-shadow .35s ease, background .3s ease;
}
.card:hover {
	transform: translateY(-6px);
	border-color: rgba(84, 230, 255, .45);
	background: rgba(255, 255, 255, .06);
	box-shadow: 0 30px 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(84, 230, 255, .12), 0 0 60px rgba(29, 93, 255, .12);
}
.card h3 { font-size: 1.34rem; color: var(--white); }
.card p { color: var(--text-dim); font-size: .96rem; }
.card-link { margin-top: auto; }

/* Panel destacado con borde degradado */
.panel-grad {
	position: relative;
	padding: clamp(30px, 4.5vw, 56px);
	background: linear-gradient(150deg, var(--navy-2), var(--navy));
	border-radius: var(--radius);
	overflow: hidden;
}
.panel-grad::before {
	content: "";
	position: absolute;
	inset: 0;
	padding: 1px;
	border-radius: var(--radius);
	background: linear-gradient(130deg, rgba(84, 230, 255, .6), rgba(29, 93, 255, .25) 40%, transparent 70%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

.text-link {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: .93rem;
	color: var(--cyan-light);
}
.text-link .arr { transition: transform .25s var(--ease); }
.text-link:hover .arr { transform: translateX(5px); }

/* ------------------------------------------------------------
   Marquee
   ------------------------------------------------------------ */
.marquee { border-block: 1px solid var(--line); background: var(--navy-2); overflow: hidden; }
.marquee-track { display: flex; width: max-content; padding: 18px 0; animation: marquee 32s linear infinite; }
.marquee span {
	display: flex;
	align-items: center;
	gap: 28px;
	padding-right: 28px;
	font-family: var(--font-display);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--text-dim);
	white-space: nowrap;
}
.marquee span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------
   Listas editoriales
   ------------------------------------------------------------ */
.row-list { border-top: 1px solid var(--line); }
.row-item {
	display: grid;
	grid-template-columns: 70px 1fr;
	gap: 22px;
	padding: 26px 0;
	border-bottom: 1px solid var(--line);
	transition: padding-left .3s var(--ease);
}
.row-item:hover { padding-left: 12px; }
.row-item strong { display: block; margin-bottom: 5px; font-family: var(--font-display); font-size: 1.12rem; color: var(--white); }
.row-item p { color: var(--text-dim); font-size: .96rem; }

/* ------------------------------------------------------------
   Comparador antes / después
   ------------------------------------------------------------ */
.ba {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: 0 40px 90px rgba(0, 0, 0, .5);
	touch-action: none;
	cursor: ew-resize;
	user-select: none;
	-webkit-user-select: none;
}
.ba-layer { display: block; }
.ba-new { position: absolute; inset: 0; overflow: hidden; }
.ba-new .ba-inner { position: absolute; inset: 0; }
.ba-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 3px;
	margin-left: -1.5px;
	background: var(--cyan-light);
	box-shadow: 0 0 24px rgba(84, 230, 255, .9);
	pointer-events: none;
}
.ba-handle::after {
	content: "◂ ▸";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	color: var(--navy);
	background: var(--cyan-light);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: -1px;
}
.ba-tag {
	position: absolute;
	top: 14px;
	z-index: 3;
	padding: 7px 13px;
	border-radius: 999px;
	font-family: var(--font-display);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	pointer-events: none;
}
.ba-tag-old { left: 14px; color: #fff; background: rgba(0, 0, 0, .55); }
.ba-tag-new { right: 14px; color: var(--navy); background: var(--cyan-light); }

/* ------------------------------------------------------------
   Formulario
   ------------------------------------------------------------ */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 600; color: var(--text-dim); }
.field input, .field textarea, .field select {
	width: 100%;
	padding: 13px 15px;
	color: var(--text);
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(232, 241, 255, .16);
	border-radius: var(--radius-sm);
	outline: 0;
	transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
	border-color: var(--cyan-light);
	background: rgba(255, 255, 255, .08);
	box-shadow: 0 0 0 3px rgba(84, 230, 255, .15);
}
.field select option { color: var(--ink); background: var(--white); }
.field textarea { min-height: 120px; resize: vertical; }
.check {
	grid-column: 1 / -1;
	display: flex;
	align-items: flex-start;
	gap: 11px;
	font-size: .84rem;
	color: var(--text-dim);
}
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--cyan); flex: none; }
.form .btn { grid-column: 1 / -1; border: 0; }
.form-status { display: none; grid-column: 1 / -1; color: var(--cyan-light); font-size: .85rem; }
.form-status.show { display: block; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.footer { padding: 76px 0 32px; background: var(--navy-2); border-top: 1px solid var(--line); color: var(--text-dim); }
.footer-top {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 48px;
	padding-bottom: 52px;
	border-bottom: 1px solid var(--line);
}
.footer-brand p { max-width: 320px; margin-top: 18px; font-size: .92rem; line-height: 1.6; }
.footer-col strong {
	display: block;
	margin-bottom: 16px;
	color: var(--white);
	font-family: var(--font-display);
	font-size: .76rem;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
}
.footer-col a, .footer-col .soon-note { display: block; margin-top: 11px; font-size: .92rem; }
.footer-col a { transition: color .2s ease; }
.footer-col a:hover { color: var(--cyan-light); }
.footer-col .soon-note { opacity: .45; }
.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 18px;
	padding-top: 26px;
	font-size: .8rem;
	color: var(--text-faint);
}

/* ------------------------------------------------------------
   Animaciones de entrada
   ------------------------------------------------------------ */
.reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.stagger > * {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .75s var(--ease), transform .75s var(--ease);
}
.stagger.visible > * { opacity: 1; transform: none; }
.stagger.visible > :nth-child(2) { transition-delay: .08s; }
.stagger.visible > :nth-child(3) { transition-delay: .16s; }
.stagger.visible > :nth-child(4) { transition-delay: .24s; }
.stagger.visible > :nth-child(5) { transition-delay: .32s; }
.stagger.visible > :nth-child(6) { transition-delay: .4s; }
.stagger.visible > :nth-child(7) { transition-delay: .48s; }
.stagger.visible > :nth-child(8) { transition-delay: .56s; }

[data-parallax] { will-change: transform; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1020px) {
	.footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
	.menu-btn { display: block; }
	.nav-links {
		position: fixed;
		inset: 0;
		z-index: 101;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		gap: 26px;
		padding: 100px 32px;
		background: var(--navy);
		opacity: 0;
		pointer-events: none;
		transition: opacity .3s ease;
	}
	.menu-open .nav-links { opacity: 1; pointer-events: auto; }
	.nav-links a:not(.btn) { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--text); }
	.form { grid-template-columns: 1fr; }
	.field.full, .check, .form .btn, .form-status { grid-column: 1; }
}
@media (max-width: 560px) {
	.wrap { width: min(100% - 32px, 520px); }
	.footer-top { grid-template-columns: 1fr; gap: 34px; }
	.btn { width: 100%; }
	.tagline { letter-spacing: .18em; font-size: .7rem; }
	.tagline span + span::before { margin: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
	.reveal, .stagger > * { opacity: 1; transform: none; }
	[data-parallax] { transform: none !important; }
}
