/* ============================================================
   LinkPremium — Design System
   Tipos: Space Grotesk (display) · Inter (texto) · JetBrains Mono (métricas)
   Paleta: índigo eléctrico + cian sobre azul espacial profundo
   ============================================================ */

:root {
  --ink: #0A0E23;
  --ink-2: #131A3A;
  --ink-3: #1C2550;
  --primary: #4F46E5;
  --primary-strong: #4338CA;
  --cyan: #22D3EE;
  --gold: #EAB308;
  --green: #10B981;
  --red: #DC2626;

  --bg: #F6F7FC;
  --surface: #FFFFFF;
  --surface-2: #EEF0FA;
  --text: #14183A;
  --text-muted: #5A6081;
  --border: #DFE3F2;
  --shadow: 0 10px 30px -12px rgba(20, 24, 58, .18);

  --grad: linear-gradient(120deg, #4F46E5, #22D3EE);
  --radius: 14px;
  --radius-sm: 9px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --space-1: 6px; --space-2: 12px; --space-3: 20px;
  --space-4: 32px; --space-5: 52px; --space-6: 84px;
}

[data-theme="dark"] {
  --bg: #070A1C;
  --surface: #0E1330;
  --surface-2: #151B3E;
  --text: #E8EAF9;
  --text-muted: #9AA1C6;
  --border: #232B57;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background .25s ease, color .25s ease;
}

img, svg { max-width: 100%; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.12rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
[data-theme="dark"] a { color: #8EA2FF; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.inline { display: inline; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 640px; }

.text-gradient {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute; inset-inline-start: 8px; top: -48px;
  background: var(--primary); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); z-index: 200; transition: top .2s;
}
.skip-link:focus { top: 8px; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: 10px 20px; border-radius: 99px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s, color .18s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px -6px rgba(79, 70, 229, .55); }
.btn-primary:hover { box-shadow: 0 10px 26px -6px rgba(34, 211, 238, .5); transform: translateY(-1px); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
[data-theme="dark"] .btn-outline { border-color: #8EA2FF; color: #8EA2FF; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-glow {
  background: #fff; color: var(--ink); font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 8px 30px -8px rgba(34,211,238,.65);
}
.btn-glow:hover { transform: translateY(-1px); }
.btn-block { width: 100%; justify-content: center; }
.btn-xs { padding: 4px 12px; font-size: .8rem; }

.linklike { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; }
[data-theme="dark"] .linklike { color: #8EA2FF; }
.linklike:hover { text-decoration: underline; }

/* ---------- Navegación ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: var(--space-3); padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--text); }
.brand-name em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-links a {
  color: var(--text-muted); font-weight: 500; font-size: .95rem;
  padding: 8px 13px; border-radius: 99px; text-decoration: none !important;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); }
[data-theme="dark"] .nav-links a.active { color: #8EA2FF; }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  background: none; border: 1.5px solid var(--border); border-radius: 99px;
  width: 38px; height: 38px; display: grid; place-items: center;
  cursor: pointer; color: var(--text);
}
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1.5px solid var(--border); border-radius: 99px;
  padding: 8px 12px; cursor: pointer; color: var(--text); font: inherit; font-size: .88rem;
}
.lang-code { font-family: var(--font-mono); font-size: .8rem; }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); list-style: none;
  width: 230px; max-height: 380px; overflow: auto; padding: 6px;
  display: none; z-index: 120;
}
.lang-switch.open .lang-menu { display: block; }
.lang-menu a {
  display: flex; gap: 8px; align-items: center; padding: 8px 10px;
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none !important; font-size: .92rem;
}
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu a.current { color: var(--primary); font-weight: 600; }

.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Flash ---------- */
.flash {
  position: sticky; top: 70px; z-index: 90;
  width: min(680px, calc(100% - 40px)); margin: 12px auto;
  padding: 12px 20px; border-radius: var(--radius); font-weight: 500;
  box-shadow: var(--shadow); animation: slideDown .3s ease;
}
.flash-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.flash-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
[data-theme="dark"] .flash-success { background: #052E24; color: #6EE7B7; border-color: #065F46; }
[data-theme="dark"] .flash-error { background: #3A0D0D; color: #FCA5A5; border-color: #7F1D1D; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1100px 500px at 70% -10%, #1C2550 0%, #0A0E23 55%);
  color: #E8EAF9; padding-block: var(--space-6);
}
.hero-bg { position: absolute; inset: 0; opacity: .8; }
.hero-net { width: 100%; height: 100%; }
.net-node { animation: pulse 4.5s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.net-line { stroke-dasharray: 6 8; animation: dashmove 14s linear infinite; }
@keyframes pulse { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: 1; transform: scale(1.5); } }
@keyframes dashmove { to { stroke-dashoffset: -280; } }

.hero-inner { position: relative; text-align: center; max-width: 860px; }
.hero h1 { margin-block: 14px 18px; color: #fff; }
.hero .lead { color: #B9BFDF; font-size: 1.12rem; max-width: 640px; margin-inline: auto; }

.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
  border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent);
  padding: 5px 14px; border-radius: 99px;
  background: color-mix(in srgb, var(--cyan) 8%, transparent);
}

.hero-search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  border-radius: 99px; padding: 8px 8px 8px 20px;
  max-width: 620px; margin: 30px auto 0;
}
.hero-search svg { color: #8EA2FF; flex-shrink: 0; }
.hero-search input {
  flex: 1; background: none; border: 0; outline: none;
  color: #fff; font: inherit; font-size: 1rem; min-width: 0;
}
.hero-search input::placeholder { color: #7D86B4; }

.hero-stats {
  display: flex; justify-content: center; gap: clamp(20px, 5vw, 60px);
  margin-top: 44px; flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-size: 1.9rem; color: #fff; }
.hero-stats span { font-size: .85rem; color: #8A92BE; }

/* ---------- Secciones ---------- */
.section { padding-block: var(--space-5); }
.section-alt { background: var(--surface-2); }
.section-dark {
  background: radial-gradient(900px 400px at 20% 0%, #1C2550 0%, #0A0E23 60%);
  color: #E8EAF9;
}
.section-dark h2 { color: #fff; }
.section-dark .lead { color: #B9BFDF; }
.section-title { margin-bottom: var(--space-3); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: var(--space-3); flex-wrap: wrap; }
.lead { color: var(--text-muted); font-size: 1.05rem; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-5); align-items: center; }

.page-head {
  background: radial-gradient(900px 320px at 60% -40%, #1C2550 0%, #0A0E23 70%);
  color: #fff; padding-block: var(--space-5);
}
.page-head .lead { color: #B9BFDF; }
.page-head h1 { color: #fff; }
.breadcrumbs { font-size: .85rem; color: #8A92BE; margin-bottom: 10px; }
.breadcrumbs a { color: #B9BFDF; }

/* ---------- Grids y tarjetas ---------- */
.grid { display: grid; gap: var(--space-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-split { grid-template-columns: 1.4fr .6fr; align-items: start; }

.site-card, .resource-card, .post-card, .step-card, .form-card, .row-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.site-card, .resource-card { padding: var(--space-3); display: flex; flex-direction: column; gap: 12px; transition: transform .2s ease, box-shadow .2s ease; }
.site-card:hover, .resource-card:hover, .post-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -14px rgba(20,24,58,.3); }

.site-card-top { display: flex; gap: 12px; align-items: flex-start; }
.site-avatar {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700;
}
.site-title a { color: var(--text); text-decoration: none !important; }
.site-title a:hover { color: var(--primary); }
.site-domain { font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted); }
.site-desc { font-size: .92rem; color: var(--text-muted); flex: 1; }

.site-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.site-metrics div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; text-align: center; }
.site-metrics dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.site-metrics dd { font-weight: 600; font-size: .95rem; }

.site-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.site-meta { font-size: .82rem; color: var(--text-muted); }
.site-price { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
[data-theme="dark"] .site-price { color: #8EA2FF; }

/* Badges */
.badge {
  display: inline-block; font-size: .72rem; font-weight: 600;
  padding: 3px 10px; border-radius: 99px; letter-spacing: .02em;
}
.badge-green { background: #ECFDF5; color: #065F46; }
.badge-muted { background: var(--surface-2); color: var(--text-muted); }
.badge-gold { background: #FEF9C3; color: #854D0E; }
.badge-cat { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
[data-theme="dark"] .badge-green { background: #052E24; color: #6EE7B7; }
[data-theme="dark"] .badge-gold { background: #422F06; color: #FDE047; }
[data-theme="dark"] .badge-cat { color: #8EA2FF; }
.badge-status-pending { background: #FEF9C3; color: #854D0E; }
.badge-status-accepted, .badge-status-in_progress { background: #E0E7FF; color: #3730A3; }
.badge-status-published, .badge-status-completed, .badge-status-approved { background: #ECFDF5; color: #065F46; }
.badge-status-cancelled, .badge-status-rejected { background: #FEF2F2; color: #991B1B; }
[data-theme="dark"] .badge-status-pending { background: #422F06; color: #FDE047; }
[data-theme="dark"] .badge-status-accepted, [data-theme="dark"] .badge-status-in_progress { background: #1E1B4B; color: #A5B4FC; }
[data-theme="dark"] .badge-status-published, [data-theme="dark"] .badge-status-completed, [data-theme="dark"] .badge-status-approved { background: #052E24; color: #6EE7B7; }
[data-theme="dark"] .badge-status-cancelled, [data-theme="dark"] .badge-status-rejected { background: #3A0D0D; color: #FCA5A5; }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: var(--space-3); }
.chip {
  padding: 8px 16px; border-radius: 99px; font-size: .9rem; font-weight: 500;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text);
  text-decoration: none !important; transition: .18s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.chip-active { background: var(--grad); border-color: transparent; color: #fff; }
.chip-active:hover { color: #fff; }

/* Steps */
.step-card { padding: var(--space-4); }
.step-icon { width: 42px; height: 42px; color: var(--primary); margin-bottom: 14px; }
[data-theme="dark"] .step-icon { color: #8EA2FF; }
.step-card h3 { margin-bottom: 8px; }
.step-card p { color: var(--text-muted); font-size: .95rem; }
.num-list { padding-inline-start: 20px; margin-block: 14px; display: grid; gap: 8px; }

.tick-list { list-style: none; display: grid; gap: 12px; }
.tick-list li { padding-inline-start: 30px; position: relative; }
.tick-list li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
  background: var(--cyan);
}

/* Posts */
.post-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.post-cover { display: block; height: 150px; }
.cover-aurora { background: linear-gradient(130deg, #4F46E5, #22D3EE 55%, #10B981); }
.cover-orbit { background: radial-gradient(circle at 30% 40%, #22D3EE 0%, #4F46E5 45%, #0A0E23 100%); }
.cover-grid { background: linear-gradient(#0A0E23, #1C2550), repeating-linear-gradient(90deg, rgba(34,211,238,.25) 0 1px, transparent 1px 28px), repeating-linear-gradient(0deg, rgba(34,211,238,.25) 0 1px, transparent 1px 28px); background-blend-mode: overlay; }
.cover-signal { background: conic-gradient(from 210deg at 60% 40%, #0A0E23, #4F46E5, #22D3EE, #0A0E23); }
.cover-mesh { background: radial-gradient(circle at 20% 20%, #22D3EE33 0 24%, transparent 25%), radial-gradient(circle at 80% 30%, #4F46E566 0 30%, transparent 31%), radial-gradient(circle at 50% 90%, #10B98155 0 26%, transparent 27%), #0E1330; }
.cover-pulse { background: repeating-radial-gradient(circle at 50% 50%, #4F46E5 0 2px, #0A0E23 3px 34px); }
.post-body { padding: var(--space-3); display: flex; flex-direction: column; gap: 8px; }
.post-body time { font-size: .8rem; color: var(--text-muted); font-family: var(--font-mono); }
.post-body a { color: var(--text); text-decoration: none !important; }
.post-body a:hover { color: var(--primary); }
.post-body p { color: var(--text-muted); font-size: .92rem; }
.post-head { position: relative; }
.post-head.cover-aurora, .post-head[class*="cover-"] { background-blend-mode: multiply; }

/* CTA panel */
.cta-panel {
  text-align: center; padding: var(--space-5);
  background: radial-gradient(700px 300px at 50% -30%, #1C2550 0%, #0A0E23 70%);
  border-radius: 24px; color: #fff;
}
.cta-panel .lead { color: #B9BFDF; margin-block: 10px 24px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-panel .btn-outline { border-color: #8EA2FF; color: #B9C4FF; }

/* ---------- Marketplace ---------- */
.market-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-4); align-items: start; }
.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-3); display: grid; gap: 14px;
  position: sticky; top: 84px;
}
.filter-group { display: grid; gap: 6px; }
.filter-group label { font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 12px; width: 100%;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; }

.results-count { color: var(--text-muted); font-size: .9rem; margin-bottom: 14px; }
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: var(--space-5);
  background: var(--surface); border: 1.5px dashed var(--border); border-radius: var(--radius);
  display: grid; gap: 12px; justify-items: center; color: var(--text-muted);
}

.inline-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-3); }
.inline-filters input[type="search"] { max-width: 260px; }
.inline-filters input[type="number"] { max-width: 120px; }
.inline-filters select { max-width: 190px; }

/* Detail */
.detail-layout { display: grid; grid-template-columns: 1.4fr .6fr; gap: var(--space-4); align-items: start; margin-bottom: var(--space-4); }
.detail-main h2 { margin-block: var(--space-3) 10px; }
.metric-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: var(--space-3); }
.metric-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 2px;
  color: var(--text); text-decoration: none !important;
}
.metric-value { font-size: 1.7rem; font-weight: 700; color: var(--primary); }
[data-theme="dark"] .metric-value { color: #8EA2FF; }
.metric-tile span:last-child { font-size: .82rem; color: var(--text-muted); }

.buy-box {
  background: var(--surface); border: 1.5px solid var(--primary); border-radius: var(--radius);
  padding: var(--space-3); display: grid; gap: 8px; position: sticky; top: 84px;
  box-shadow: 0 12px 40px -14px rgba(79,70,229,.35);
}
.buy-price { font-size: 2rem; font-weight: 700; color: var(--primary); }
[data-theme="dark"] .buy-price { color: #8EA2FF; }
.buy-price-alt { font-size: 1.2rem; font-weight: 700; }
.buy-note { color: var(--text-muted); font-size: .85rem; }
.buy-box label { font-size: .82rem; font-weight: 600; color: var(--text-muted); margin-top: 6px; }

/* Resource cards */
.resource-card header { display: flex; justify-content: space-between; align-items: center; }
.resource-card h3 a { color: var(--text); text-decoration: none !important; }
.resource-card h3 a:hover { color: var(--primary); }
.resource-card p { color: var(--text-muted); font-size: .9rem; flex: 1; }
.resource-card .services { font-size: .8rem; font-family: var(--font-mono); color: var(--primary); }
.resource-card footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; }
.da-pill {
  background: var(--ink); color: var(--cyan); font-size: .78rem; font-weight: 600;
  padding: 4px 10px; border-radius: 99px;
}

.note-box {
  margin-top: var(--space-4); padding: var(--space-3);
  border-inline-start: 4px solid var(--cyan);
  background: color-mix(in srgb, var(--cyan) 7%, var(--surface));
  border-radius: var(--radius-sm);
}
.note-box h2 { font-size: 1.05rem; margin-bottom: 6px; }
.note-box p { color: var(--text-muted); font-size: .93rem; }

/* ---------- Formularios ---------- */
.form-card { padding: var(--space-4); display: grid; gap: 14px; }
.form-wide { max-width: 860px; }
.form-alt { font-size: .85rem; color: var(--text-muted); text-align: center; }
.check-label { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.check-label input { width: auto; }
.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; height: 0; width: 0; }
.auth-section { min-height: 60vh; display: grid; align-items: center; }

.role-picker { border: 0; display: grid; gap: 10px; }
.role-picker legend { font-weight: 600; margin-bottom: 8px; }
.role-option {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: var(--radius); padding: 14px;
  transition: border-color .15s, background .15s;
}
.role-option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.role-option input { width: auto; margin-top: 4px; }
.role-option small { display: block; color: var(--text-muted); }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  text-align: start; font-family: var(--font-display); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
  padding: 12px 14px; border-bottom: 1.5px solid var(--border);
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { width: auto; }

.row-card {
  padding: var(--space-3); margin-bottom: 12px;
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
}
.row-unread { border-inline-start: 4px solid var(--cyan); }

/* ---------- Paginación ---------- */
.pagination-wrap { margin-top: var(--space-4); display: flex; justify-content: center; }
.pagination-wrap nav { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination-wrap a, .pagination-wrap span[aria-current], .pagination-wrap span[aria-disabled] {
  display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding-inline: 8px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  color: var(--text); text-decoration: none !important; font-size: .9rem;
}
.pagination-wrap span[aria-current] > span { background: none; }
.pagination-wrap span[aria-current] { background: var(--grad); color: #fff; border-color: transparent; }
.pagination-wrap a:hover { border-color: var(--primary); }
.pagination-wrap p { display: none; }
.pagination-wrap svg { width: 16px; height: 16px; }

/* ---------- Prose (blog / legal) ---------- */
.prose { max-width: 760px; margin-inline: auto; display: grid; gap: 16px; }
.prose h2 { margin-top: var(--space-3); }
.prose ul, .prose ol { padding-inline-start: 24px; display: grid; gap: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: start; }
.prose th { background: var(--surface-2); }
.prose blockquote { border-inline-start: 4px solid var(--primary); padding: 10px 18px; background: var(--surface-2); border-radius: var(--radius-sm); font-style: italic; }

/* ---------- Banner de red (encima del footer) ---------- */
.network-banner {
  background: linear-gradient(120deg, #0A0E23 0%, #1C2550 55%, #171E45 100%);
  color: #E8EAF9; padding-block: var(--space-5);
  border-top: 1px solid #232B57;
  position: relative; overflow: hidden;
}
.network-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px 200px at 85% 20%, rgba(34,211,238,.15), transparent 70%);
  pointer-events: none;
}
.network-banner-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-4); align-items: center; position: relative; }
.network-banner h2 { color: #fff; margin-block: 10px 8px; }
.network-banner .lead { color: #B9BFDF; margin-bottom: 20px; }
.network-banner-sites { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.network-banner-sites a {
  display: flex; align-items: center; gap: 10px;
  color: #D6DAF3; text-decoration: none !important; font-weight: 500;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  padding: 11px 16px; border-radius: var(--radius-sm); transition: .18s;
}
.network-banner-sites a:hover { background: rgba(255,255,255,.11); transform: translateX(3px); }
.network-banner-sites .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #070A1C; color: #9AA1C6; padding-block: var(--space-5) var(--space-3); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; gap: var(--space-4); }
.footer-brand p { font-size: .92rem; margin-top: 10px; max-width: 300px; }
.footer-langs { font-family: var(--font-mono); font-size: .78rem !important; color: #5A6390; }
.site-footer h3 { color: #E8EAF9; font-size: .95rem; margin-bottom: 14px; }
.site-footer nav { display: grid; gap: 9px; align-content: start; }
.site-footer nav a { color: #9AA1C6; font-size: .92rem; text-decoration: none !important; }
.site-footer nav a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid #1A2145; margin-top: var(--space-4); padding-top: var(--space-3); font-size: .85rem;
}
.footer-bottom .linklike { color: #8EA2FF; }

/* ---------- Cookies ---------- */
.cookie-banner {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 300;
  max-width: 720px; margin-inline: auto;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.35);
  animation: slideUp .35s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } }
.cookie-inner { padding: var(--space-3); display: grid; gap: 14px; }
.cookie-text h2 { font-size: 1.05rem; margin-bottom: 6px; }
.cookie-text p { font-size: .9rem; color: var(--text-muted); }
.cookie-options { display: grid; gap: 8px; margin-top: 12px; font-size: .92rem; }
.cookie-options label { display: flex; gap: 8px; align-items: center; }
.cookie-options input { width: auto; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Admin ---------- */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  background: #070A1C; padding: var(--space-3);
  display: flex; flex-direction: column; gap: var(--space-3);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-label { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #5A6390; }
.admin-side nav { display: grid; gap: 4px; flex: 1; }
.admin-side nav a {
  color: #9AA1C6; padding: 9px 12px; border-radius: var(--radius-sm);
  text-decoration: none !important; font-size: .93rem;
}
.admin-side nav a:hover { background: #10163A; color: #fff; }
.admin-side nav a.active { background: var(--grad); color: #fff; font-weight: 600; }
.admin-main { padding: var(--space-4); min-width: 0; }
.admin-main h1 { margin-bottom: var(--space-3); font-size: 1.7rem; }
.admin-main h2 { font-size: 1.15rem; margin-bottom: 12px; }
.admin-main .flash { top: 8px; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }

/* ---------- RTL ---------- */
[dir="rtl"] .network-banner-sites a:hover { transform: translateX(-3px); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .market-layout, .detail-layout, .grid-split { grid-template-columns: 1fr; }
  .filters { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: var(--space-2); box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .nav-actions .btn-ghost:not(:last-child) { display: none; }
  .grid-2, .grid-3, .svc-cards { grid-template-columns: 1fr; }
  .network-banner-inner { grid-template-columns: 1fr; }
  .site-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   YaizaLink — tres servicios con identidad de color propia
   links: índigo→cian · leads: esmeralda→lima · studio: naranja→rosa
   ============================================================ */

:root {
  --svc-links-a: #6366F1; --svc-links-b: #22D3EE;
  --svc-leads-a: #10B981; --svc-leads-b: #84CC16;
  --svc-studio-a: #F97316; --svc-studio-b: #EC4899;
  --svc-tarjetas-a: #7C5CFF; --svc-tarjetas-b: #FF4D9D;
}
.svc-links { --svc-a: var(--svc-links-a); --svc-b: var(--svc-links-b); }
.svc-leads { --svc-a: var(--svc-leads-a); --svc-b: var(--svc-leads-b); }
.svc-studio { --svc-a: var(--svc-studio-a); --svc-b: var(--svc-studio-b); }
.svc-tarjetas { --svc-a: var(--svc-tarjetas-a); --svc-b: var(--svc-tarjetas-b); }
.svc-grad { background: linear-gradient(120deg, var(--svc-a), var(--svc-b)); }
.svc-text {
  background: linear-gradient(120deg, var(--svc-a), var(--svc-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn-svc {
  background: linear-gradient(120deg, var(--svc-a), var(--svc-b)); color: #fff;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--svc-a) 55%, transparent);
}
.btn-svc:hover { transform: translateY(-1px); }

/* Menú principal con los tres servicios */
.nav-item { position: relative; }
.nav-svc-btn, .nav-plain {
  display: flex; align-items: center; gap: 7px;
  background: none; border: 0; cursor: pointer; font: inherit;
  color: var(--text-muted); font-weight: 500; font-size: .93rem;
  padding: 7px 11px; border-radius: 99px; text-decoration: none !important;
}
.nav-svc-btn:hover, .nav-plain:hover { color: var(--text); background: var(--surface-2); }
.nav-svc-btn.active, .nav-plain.active {
  color: var(--svc-a, var(--primary));
  background: color-mix(in srgb, var(--svc-a, var(--primary)) 10%, transparent);
}
.nav-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0;
  min-width: 230px; background: var(--surface);
  border: 1px solid var(--border); border-top: 3px solid var(--svc-a);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px;
  display: none; z-index: 120;
}
.nav-item.open .nav-menu { display: block; }
.nav-menu a {
  display: block; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none !important; font-size: .92rem;
}
.nav-menu a:hover { background: color-mix(in srgb, var(--svc-a) 9%, transparent); color: var(--svc-a); }
.nav-menu-label {
  font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .1em; padding: 6px 12px 4px;
  background: linear-gradient(120deg, var(--svc-a), var(--svc-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-search-btn {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1.5px solid var(--border); border-radius: 99px; color: var(--text);
  text-decoration: none !important;
}
.nav-search-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Cabeceras de página tintadas por servicio */
.page-head.svc-links { background: radial-gradient(900px 320px at 60% -40%, #272f6b 0%, #0A0E23 70%); }
.page-head.svc-leads { background: radial-gradient(900px 320px at 60% -40%, #0d4436 0%, #04211A 70%); }
.page-head.svc-studio { background: radial-gradient(900px 320px at 60% -40%, #59203c 0%, #270A18 70%); }
.page-head.svc-tarjetas { background: radial-gradient(900px 320px at 60% -40%, #3a1f66 0%, #1B0E33 70%); }

/* Tarjetas de servicio en la portada */
.svc-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.svc-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-top: 4px solid var(--svc-a);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--space-4); display: flex; flex-direction: column; gap: 12px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px -14px color-mix(in srgb, var(--svc-a) 35%, transparent); }
.svc-card::after {
  content: ''; position: absolute; top: -70px; inset-inline-end: -70px;
  width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--svc-a) 16%, transparent), transparent 70%);
}
.svc-card h2 { font-size: 1.35rem; }
.svc-card p { color: var(--text-muted); font-size: .95rem; flex: 1; }
.svc-card ul { list-style: none; display: grid; gap: 7px; font-size: .9rem; }
.svc-card ul li { padding-inline-start: 22px; position: relative; }
.svc-card ul li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(120deg, var(--svc-a), var(--svc-b));
}

/* YaizaLeads */
.lead-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  border-inline-start: 4px solid var(--svc-leads-a);
  padding: var(--space-3); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
}
.lead-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.lead-card h3 { font-size: 1.02rem; }
.lead-domain { font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted); }
.lead-desc { font-size: .9rem; color: var(--text-muted); flex: 1; }
.lead-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.score-pill {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  padding: 3px 10px; border-radius: 99px; color: #fff;
  background: linear-gradient(120deg, var(--svc-leads-a), var(--svc-leads-b));
}
.badge-verified { background: #ECFDF5; color: #065F46; }
[data-theme="dark"] .badge-verified { background: #052E24; color: #6EE7B7; }
.lead-contact { font-size: .85rem; border-top: 1px solid var(--border); padding-top: 10px; display: grid; gap: 3px; }
.lead-actions { display: flex; gap: 8px; align-items: center; }
.lead-actions select { width: auto; flex: 1; }

/* YaizaStudio: reproductor de pizarra */
.wb-player {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.wb-theme-chalk { background: #1E293B; color: #F8FAFC; }
.wb-theme-marker { background: #FFFDF5; color: #1C1917; }
.wb-theme-neon { background: #0A0E23; color: #E8EAF9; }
.wb-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 6%; text-align: center; }
.wb-scene { display: none; flex-direction: column; align-items: center; gap: 18px; max-width: 80%; }
.wb-scene.active { display: flex; }
.wb-scene .wb-art { width: clamp(70px, 16vw, 130px); height: auto; }
.wb-scene .wb-art path, .wb-scene .wb-art circle, .wb-scene .wb-art line, .wb-scene .wb-art rect, .wb-scene .wb-art polyline {
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 600; stroke-dashoffset: 600;
}
.wb-scene.active .wb-art path, .wb-scene.active .wb-art circle, .wb-scene.active .wb-art line, .wb-scene.active .wb-art rect, .wb-scene.active .wb-art polyline {
  animation: wb-draw 1.6s ease forwards;
}
@keyframes wb-draw { to { stroke-dashoffset: 0; } }
.wb-scene h2 {
  font-size: clamp(1.2rem, 3.4vw, 2.2rem);
  opacity: 0; transform: translateY(10px);
}
.wb-scene p { font-size: clamp(.9rem, 2vw, 1.15rem); opacity: 0; transform: translateY(10px); max-width: 60ch; }
.wb-scene.active h2 { animation: wb-in .6s ease .5s forwards; }
.wb-scene.active p { animation: wb-in .6s ease .9s forwards; }
@keyframes wb-in { to { opacity: 1; transform: none; } }
.wb-theme-chalk .wb-scene h2, .wb-theme-chalk .wb-scene p { font-family: var(--font-display); }
.wb-hand {
  position: absolute; width: 34px; height: 34px; opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.wb-controls {
  position: absolute; bottom: 0; inset-inline: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: linear-gradient(transparent, rgba(0,0,0,.45));
}
.wb-controls button {
  background: rgba(255,255,255,.9); color: #111; border: 0; border-radius: 99px;
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
}
.wb-progress { flex: 1; height: 5px; background: rgba(255,255,255,.25); border-radius: 99px; overflow: hidden; }
.wb-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--svc-studio-a), var(--svc-studio-b));
}
.wb-counter { color: #fff; font-family: var(--font-mono); font-size: .8rem; }

/* Editor del estudio */
.studio-editor { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; }
.scene-row {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; display: grid; gap: 10px; margin-bottom: 12px;
}
.scene-row-head { display: flex; justify-content: space-between; align-items: center; }
.scene-row-head strong { font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted); }
.scene-row .filter-row { grid-template-columns: 1fr 110px; }
.art-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.art-picker button {
  width: 42px; height: 42px; border-radius: var(--radius-sm); cursor: pointer;
  border: 2px solid var(--border); background: var(--surface); color: var(--text);
  display: grid; place-items: center; padding: 6px;
}
.art-picker button.selected { border-color: var(--svc-studio-a); background: color-mix(in srgb, var(--svc-studio-a) 10%, transparent); }
.art-picker svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Vídeo card */
.video-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .2s ease;
}
.video-card:hover { transform: translateY(-3px); }
.video-thumb {
  aspect-ratio: 16/9; display: grid; place-items: center; color: #fff; position: relative;
}
.video-thumb .play-badge {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(120deg, var(--svc-studio-a), var(--svc-studio-b));
  box-shadow: 0 8px 24px -6px rgba(236, 72, 153, .6);
}
.video-body { padding: var(--space-3); display: grid; gap: 6px; }
.video-body h3 a { color: var(--text); text-decoration: none !important; }
.video-body h3 a:hover { color: var(--svc-studio-a); }
.video-meta { font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); }

/* Buscador global y palabras clave */
.search-hero { max-width: 680px; margin-inline: auto; }
.search-result {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 10px; display: grid; gap: 4px;
}
.search-result h3 a { color: var(--primary); }
.search-result .type-tag {
  display: inline-block; font-family: var(--font-mono); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted);
}
.search-result p { font-size: .9rem; color: var(--text-muted); }
.keyword-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-cloud .chip { font-size: .85rem; }

@media (max-width: 1024px) {
  .svc-cards { grid-template-columns: repeat(2, 1fr); }
  .studio-editor { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-item { width: 100%; }
  .nav-svc-btn { width: 100%; justify-content: flex-start; }
  .nav-menu { position: static; display: block; border: 0; border-inline-start: 3px solid var(--svc-a); box-shadow: none; border-radius: 0; margin-inline-start: 14px; padding: 0 0 6px; }
  .nav-plain { width: 100%; }
}

/* Demos e imágenes realistas */
.demo-figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.demo-figure img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/2; }
.narrow-wide { max-width: 820px; margin-inline: auto; }

/* Desplegable "por qué usar estas herramientas" */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px 20px; box-shadow: var(--shadow);
}
.faq-item summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  padding: 14px 28px 14px 0; list-style: none; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--primary); transition: transform .2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item > p { padding: 0 0 16px; color: var(--text-muted); }

/* Diagrama de sinergia en la portada */
.synergy-flow { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.synergy-flow .flow-node {
  display: flex; align-items: center; gap: 8px; color: #E8EAF9;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  padding: 10px 16px; border-radius: 99px; font-family: var(--font-display); font-weight: 600; font-size: .92rem;
}
.synergy-flow .flow-arrow { color: #8A92BE; font-size: 1.2rem; }
