/**
 * SemiConecta — Secciones adicionales del landing.
 * Cadena de valor, Internacionalización, Matcher I+D+i, Grupos de trabajo.
 */

/* ===== CADENA DE VALOR ===== */
.chain-section { background: var(--navy-3); color: var(--white); }
.chain-section h2, .chain-section h3 { color: var(--white); }
.chain-section .section-head p { color: rgba(255,255,255,.62); }

.chain-console {
	display: grid;
	grid-template-columns: 240px minmax(340px,1fr) 300px;
	min-height: 560px;
	border: 1px solid rgba(255,255,255,.16);
	background: #0E0E11;
}
.chain-nav { padding: 28px; border-right: 1px solid rgba(255,255,255,.12); }
.chain-nav-title { color: rgba(255,255,255,.5); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 20px; }
.chain-nav-btn {
	display: flex; align-items: center; gap: 12px; width: 100%;
	padding: 14px 12px; margin-bottom: 4px;
	background: transparent; border: 1px solid transparent;
	color: rgba(255,255,255,.7); font-weight: 700; text-align: left;
	transition: background .2s, border-color .2s, color .2s;
}
.chain-nav-btn:hover { background: rgba(255,255,255,.04); }
.chain-nav-btn.is-active { background: rgba(255,213,0,.08); border-color: var(--yellow); color: var(--white); }
.chain-nav-code { color: var(--yellow); font-size: .72rem; font-weight: 900; letter-spacing: .1em; min-width: 22px; }

.chain-visual {
	position: relative; display: grid; place-items: center; overflow: hidden;
	background-image: linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
	background-size: 42px 42px;
}
.chain-visual svg { width: min(90%,600px); overflow: visible; }
.chain-layer { fill: #1B1B1E; stroke: rgba(255,255,255,.22); stroke-width: 1.3; transition: fill .3s, stroke .3s; }
.chain-layer.is-active { fill: #333338; stroke: var(--yellow); filter: drop-shadow(0 0 14px rgba(255,213,0,.25)); }
.chain-signal { fill: none; stroke: var(--yellow); stroke-width: 4; stroke-dasharray: 10 10; animation: signal-flow 3s linear infinite; }

.chain-detail { display: flex; flex-direction: column; padding: 34px; border-left: 1px solid rgba(255,255,255,.14); }
.chain-detail-index { color: var(--yellow); font-size: .72rem; font-weight: 900; letter-spacing: .13em; }
.chain-detail h3 { margin: 20px 0 14px; }
.chain-detail p { color: rgba(255,255,255,.65); }
.chain-resources { margin-top: auto; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); }
.chain-resources strong { display: block; font-family: var(--font-display); font-size: 2.3rem; color: var(--yellow); }
.chain-resources span { color: rgba(255,255,255,.5); font-size: .85rem; }

@media (max-width: 1000px) { .chain-console { grid-template-columns: 1fr; } .chain-nav { display: flex; flex-wrap: wrap; gap: 4px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); } }
@media (max-width: 600px) { .chain-nav-btn { font-size: .82rem; padding: 10px 8px; } }

/* ===== INTERNACIONALIZACIÓN ===== */
.international { overflow: hidden; background: var(--gray-50); }
.intl-console {
	display: grid; grid-template-columns: minmax(0,1fr) 340px;
	min-height: 580px; border: 1px solid var(--gray-200); background: var(--white);
}
.world-stage {
	position: relative; overflow: hidden; min-height: 500px;
	background: #F0F1F7; border-right: 1px solid var(--gray-200);
}
.world-stage::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle,rgba(14,14,17,.18) 1px,transparent 1px); background-size: 22px 22px; }
.world-stage svg { position: absolute; inset: 5% 2%; width: 96%; height: 90%; }
.eu-outline { fill: none; stroke: var(--gray-300); stroke-width: 1.4; }
.world-route { fill: none; stroke: #A4A4AC; stroke-width: 1.8; stroke-dasharray: 5 7; opacity: .28; transition: stroke .35s, opacity .35s, stroke-width .35s; }
.world-route.is-active { stroke: var(--yellow-dark); stroke-width: 3.5; opacity: 1; animation: signal-flow 2.5s linear infinite; }
.world-node circle { fill: var(--ink-strong); stroke: var(--white); stroke-width: 3; transition: fill .3s; }
.world-node text { font: 600 11px var(--font-body); fill: var(--gray-600); }
.spain-node circle { fill: var(--yellow) !important; stroke: var(--white); stroke-width: 4; }
.spain-node text { fill: var(--ink-strong); font-weight: 800; }
.world-node.is-active circle { fill: var(--yellow); }
.world-caption { position: absolute; left: 24px; bottom: 22px; color: var(--gray-500); font-size: .72rem; }

.intl-panel { display: flex; flex-direction: column; padding: 28px; }
.intl-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; margin-bottom: 24px; }
.intl-tabs button {
	padding: 12px 8px; background: var(--gray-100); border: 0;
	font-weight: 700; font-size: .85rem; color: var(--gray-600);
	transition: background .2s, color .2s;
}
.intl-tabs button[aria-pressed="true"] { background: var(--ink-strong); color: var(--white); }
.intl-route-btn {
	display: flex; align-items: center; gap: 14px; width: 100%;
	padding: 16px 12px; border-bottom: 1px solid var(--gray-200);
	background: transparent; border-left: 3px solid transparent;
	text-align: left; font-weight: 700; transition: background .15s, border-color .15s;
}
.intl-route-btn:hover { background: var(--gray-50); }
.intl-route-btn.is-active { background: var(--yellow-soft); border-left-color: var(--yellow); }
.intl-route-btn span:first-child { color: var(--gray-400); font-size: .72rem; font-weight: 900; letter-spacing: .08em; min-width: 24px; }
.intl-detail { margin-top: 20px; }
.intl-detail h3 { font-size: 1.3rem; margin-bottom: 10px; }
.intl-detail p { color: var(--gray-600); font-size: .95rem; }

@media (max-width: 900px) { .intl-console { grid-template-columns: 1fr; } .world-stage { min-height: 380px; border-right: 0; border-bottom: 1px solid var(--gray-200); } }

/* ===== MATCHER I+D+i ===== */
.matcher-section { background: var(--navy-3); color: var(--white); overflow: hidden; }
.matcher-section h2, .matcher-section h3 { color: var(--white); }
.matcher-section .section-head p { color: rgba(255,255,255,.67); }
.matcher-console {
	display: grid; grid-template-columns: minmax(0,1.08fr) minmax(340px,.92fr);
	min-height: 600px; color: var(--ink); background: var(--white); border: 1px solid var(--gray-200);
}
.matcher-form { padding: clamp(28px,4vw,50px); }
.matcher-progress { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; margin-bottom: 36px; }
.matcher-progress span { height: 4px; background: var(--gray-200); }
.matcher-progress span.is-active { background: var(--ink-strong); }
.matcher-progress span.is-complete { background: var(--yellow); }
.matcher-step-label { color: var(--ink-strong); font-size: .72rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.matcher-form h3 { margin: 18px 0 28px; color: var(--ink); font-size: clamp(1.6rem,2.5vw,2.4rem); }
.matcher-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.matcher-option {
	padding: 18px 16px; border: 1px solid var(--gray-200); background: var(--white);
	text-align: left; cursor: pointer; transition: border-color .2s, background .2s;
}
.matcher-option:hover { background: var(--gray-50); }
.matcher-option.is-selected { border-color: var(--yellow); background: var(--yellow-soft); }
.matcher-option .choice-index { color: var(--gray-400); font-size: .7rem; font-weight: 900; }
.matcher-option strong { display: block; font-size: .92rem; margin-top: 4px; }
.matcher-option small { display: block; margin-top: 4px; color: var(--gray-500); font-size: .82rem; }
.matcher-controls { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; }
.matcher-visual {
	position: relative; display: grid; place-items: center;
	background: var(--ink-strong); overflow: hidden;
}
.matcher-visual::before { content: ""; position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.25) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,.25) 1px,transparent 1px); background-size: 46px 46px; }
.matcher-chip { position: relative; width: min(82%,400px); aspect-ratio: 1/1; }
.matcher-chip svg { width: 100%; height: 100%; }
.matcher-chip-path { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 4; transition: stroke .3s; }
.matcher-chip-path.is-complete { stroke: var(--yellow); stroke-dasharray: 9 9; animation: signal-flow 2s linear infinite; }
.matcher-chip-module { fill: #1B1B1E; stroke: rgba(255,255,255,.25); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
.matcher-chip-module.is-active, .matcher-chip-module.is-complete { fill: #3A3A40; stroke: var(--yellow); }
.matcher-chip-label { font: 800 12px var(--font-body); fill: rgba(255,255,255,.75); letter-spacing: .06em; }
.matcher-visual-status { position: absolute; left: 28px; right: 28px; bottom: 24px; display: flex; justify-content: space-between; color: rgba(255,255,255,.5); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.matcher-result { margin-top: 20px; }
.result-summary { padding: 20px; background: var(--yellow-soft); border-left: 5px solid var(--yellow); margin-bottom: 20px; }
.result-summary strong { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.result-summary span { color: var(--gray-600); font-size: .9rem; }
.match-list { display: flex; flex-direction: column; gap: 4px; }
.match-item { display: flex; gap: 14px; padding: 14px 12px; border-bottom: 1px solid var(--gray-200); }
.match-item span:first-child { color: var(--gray-400); font-size: .72rem; font-weight: 900; min-width: 22px; }
.match-item strong { display: block; font-size: .9rem; }
.match-item small { color: var(--gray-500); font-size: .82rem; }

@media (max-width: 900px) { .matcher-console { grid-template-columns: 1fr; } .matcher-visual { min-height: 400px; } .matcher-options { grid-template-columns: 1fr; } }

/* ===== GRUPOS DE TRABAJO ===== */
.groups-section { overflow: hidden; background: var(--white); }
.groups-layout {
	display: grid; grid-template-columns: minmax(480px,1.1fr) minmax(280px,.55fr);
	gap: clamp(40px,7vw,100px); align-items: center;
}
.orbit {
	position: relative; width: min(100%,620px); aspect-ratio: 1/1;
	margin-inline: auto;
}
.orbit-ring {
	position: absolute; inset: 8%; border: 2px dashed var(--gray-200); border-radius: 50%;
}
.orbit-center {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	width: 100px; text-align: center;
}
.orbit-center img { width: 48px; height: 48px; object-fit: contain; }
.orbit-center span { font-size: .72rem; font-weight: 800; color: var(--gray-500); letter-spacing: .06em; text-transform: uppercase; }
.orbit-node {
	position: absolute; transform: translate(-50%,-50%);
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	background: none; border: 0; cursor: pointer; z-index: 2;
}
.orbit-dot {
	width: 22px; height: 22px; border-radius: 50%;
	background: var(--ink-strong); border: 3px solid var(--gray-300);
	transition: background .25s, border-color .25s, transform .25s;
}
.orbit-node:hover .orbit-dot { transform: scale(1.2); border-color: var(--yellow); }
.orbit-node.is-active .orbit-dot { background: var(--yellow); border-color: var(--ink-strong); transform: scale(1.3); }
.orbit-label { font-size: .72rem; font-weight: 700; color: var(--gray-600); white-space: nowrap; max-width: 120px; text-align: center; }
.orbit-node.is-active .orbit-label { color: var(--ink-strong); font-weight: 800; }

.group-detail { padding: 0; }
.group-code { color: var(--ink-strong); font-size: .72rem; font-weight: 900; letter-spacing: .13em; display: block; margin-bottom: 16px; }
.group-detail h3 { font-size: clamp(1.6rem,2.4vw,2.2rem); margin-bottom: 14px; }
.group-detail p { color: var(--gray-600); font-size: 1.02rem; margin-bottom: 24px; }
.group-stat { padding: 18px; background: var(--gray-50); border: 1px solid var(--gray-200); }
.group-stat strong { color: var(--yellow-dark); font-family: var(--font-display); font-size: 1.8rem; }

@media (max-width: 900px) { .groups-layout { grid-template-columns: 1fr; } .orbit { max-width: 500px; } }

/* ===== MATCHER · routing system (v0.25) ===== */
/* Módulo activo: pulso de señal */
.matcher-chip-module.is-active { animation: matcher-pulse 2s ease-in-out infinite; }
@keyframes matcher-pulse { 0%,100% { filter: drop-shadow(0 0 0 rgba(255,213,0,0)); } 50% { filter: drop-shadow(0 0 10px rgba(255,213,0,.4)); } }
/* Path que se dibuja al completar (además de la señal) */
.matcher-chip-path { stroke-dasharray: 60; stroke-dashoffset: 60; transition: stroke-dashoffset .6s var(--sc-ease-tech, ease), stroke .3s; }
.matcher-chip-path.is-complete { stroke-dashoffset: 0; }
/* Microinteracción de opción: marcador de nodo que aparece al hover/seleccionar */
.matcher-option { position: relative; transition: background .2s, border-color .2s, transform .15s; }
.matcher-option::after { content: ""; position: absolute; top: 10px; right: 10px; width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--gray-300); transition: background .2s, border-color .2s; }
.matcher-option:hover { transform: translateX(2px); }
.matcher-option[aria-pressed="true"]::after { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,213,0,.25); }
.matcher-option[aria-pressed="true"] { border-color: var(--yellow); background: var(--yellow-soft); }
/* Estado del motor: monoespaciado técnico */
.matcher-visual-status { font-family: var(--font-mono, monospace); letter-spacing: .08em; }
@media (prefers-reduced-motion: reduce) {
	.matcher-chip-module.is-active { animation: none; }
	.matcher-chip-path { stroke-dashoffset: 0 !important; }
}

/* ===== CADENA DE VALOR · refinamiento (v0.25) ===== */
/* La capa activa se eleva y proyecta sombra amarilla (capas apiladas = silicio) */
.chain-layer { transition: fill .3s, stroke .3s, transform .4s var(--sc-ease-tech, ease), filter .3s; transform-origin: center; }
.chain-layer.is-active { transform: translateY(-3px) scale(1.02); }
/* La señal recorre la ruta continuamente pero con más presencia */
.chain-signal { fill: none; stroke: var(--yellow); stroke-width: 2.5; stroke-dasharray: 7 11; opacity: .5; animation: signal-flow 3.2s linear infinite; }
/* Botón de capa: marcador de nodo a la izquierda */
.chain-button { position: relative; transition: background .2s, border-color .2s, transform .15s; }
.chain-button::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; background: var(--yellow); transform: translateY(-50%); transition: height .25s var(--sc-ease-tech, ease); }
.chain-button[aria-pressed="true"]::before { height: 70%; }
.chain-button[aria-pressed="true"] { transform: translateX(3px); }
.chain-detail-index { font-family: var(--font-mono, monospace); letter-spacing: .12em; }
@media (prefers-reduced-motion: reduce) { .chain-signal { animation: none; } }

/* ===== INTERNACIONALIZACIÓN · red industrial (v0.25) ===== */
/* Rutas: la activa se DIBUJA desde España al destino, luego fluye la señal */
.world-route { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1.8; opacity: .5; transition: opacity .3s; }
.world-route.is-active {
	stroke: var(--yellow);
	stroke-width: 3;
	opacity: 1;
	stroke-dasharray: 400;
	stroke-dashoffset: 400;
	animation: intl-draw .9s var(--sc-ease-tech, ease) forwards, signal-flow 2.4s linear .9s infinite;
}
@keyframes intl-draw { to { stroke-dashoffset: 0; } }
/* Nodos como hubs industriales: cuadro (no círculo turístico) al activarse */
.world-node circle { transition: fill .3s, r .3s; }
.world-node.is-active circle { fill: var(--yellow); r: 10; }
.world-node.is-active text { fill: var(--white); font-weight: 800; }
.spain-node circle { fill: var(--yellow); }
.spain-node text { fill: var(--yellow); font-weight: 800; letter-spacing: .1em; }
/* Botón de ruta: marcador de nodo */
.route-button { position: relative; transition: background .2s, border-color .2s, transform .15s; }
.route-button.is-active { transform: translateX(3px); }
.route-button span:first-child { font-family: var(--font-mono, monospace); }
@media (prefers-reduced-motion: reduce) {
	.world-route.is-active { animation: none; stroke-dashoffset: 0; }
}

/* ===== RECURSOS · biblioteca técnica indexada (v0.27) ===== */
.feature-index-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--sc-line, rgba(14,14,17,.12)); font-family: var(--font-mono, monospace); font-size: .62rem; font-weight: 700; letter-spacing: .16em; color: var(--gray-500); }
.feature-item { position: relative; transition: background .2s, transform .15s; }
.feature-item .index { font-family: var(--font-mono, monospace); letter-spacing: .06em; transition: color .2s; }
.feature-item.is-active { background: var(--gray-50); }
.feature-item.is-active .index { color: var(--yellow-dark); }
/* Marcador de lectura del item activo (nodo + línea que apunta al spotlight) */
.feature-item::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; background: var(--yellow); transform: translateY(-50%); transition: height .25s var(--sc-ease-tech, ease); }
.feature-item.is-active::before { height: 64%; }
.feature-item:hover { transform: translateX(2px); }
.feature-item small { font-family: var(--font-mono, monospace); font-size: .68rem; letter-spacing: .04em; }
